1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00
OpenSTF/res/app/components/stf/image-onload/image-onload-animate-directive.js
2014-09-02 17:25:22 +09:00

12 lines
362 B
JavaScript

module.exports = function imageOnloadAnimateDirective($parse, $animate) {
return {
restrict: 'A',
link: function (scope, element) {
$animate.addClass(element, 'ng-image-not-loaded')
element.bind('load', function () {
$animate.removeClass(element, 'ng-image-not-loaded')
// console.log('image is loaded')
})
}
}
}