In Angular 1.3.0-rc.5, $animate defers changes till the next digest.

Disabled animation for now.
This commit is contained in:
Gunther Brunner
2014-10-10 16:01:39 +09:00
parent 84e3c96a85
commit d105052b20
2 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ module.exports = function imageOnloadAnimateDirective($parse, $animate) {
$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')
})
}

View File

@@ -39,6 +39,6 @@
h5 {{ device.name }}
h6 {{ shot.body.date | date:'HH:mm:ss' }}
a(ng-href='{{ shot.body.href }}', target='_blank')
img(ng-src='{{ shot.body.href + shotSizeUrlParameter(480) }}', image-onload-animate).screenshot-image
img(ng-src='{{ shot.body.href + shotSizeUrlParameter(480) }}').screenshot-image
.clearfix