mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
16 lines
432 B
JavaScript
16 lines
432 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')
|
|
|
|
//if(!scope.$$phase) {
|
|
// scope.$digest()
|
|
//}
|
|
// console.log('image is loaded')
|
|
})
|
|
}
|
|
}
|
|
}
|