mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
12 lines
267 B
JavaScript
12 lines
267 B
JavaScript
module.exports = function imageOnloadDirective() {
|
|
return {
|
|
restrict: 'A',
|
|
link: function (scope, element, attrs) {
|
|
element.bind('load', function() {
|
|
scope.$eval(attrs.imageOnload)
|
|
// console.log('image is loaded')
|
|
})
|
|
}
|
|
}
|
|
}
|