Search Posts

Category: ng-animate

Fade in image on page load

How would I fade in an image on page load using Angular JS, currently this is my code on AngularJS, but it doesn’t work (based off of: http://plnkr.co/edit/ncqEB3PafIWbwv0UH1QG?p=preview) View <object type=”image/svg+xml” data=”img/logo-blue.svg” class=”navbar-logo” ng-class=”{‘fade-in’: vm.fade }”></object> Controller vm.fade = true; CSS .animation { opacity:0; transition:all 200ms ease-in-out; } .animation.fade-in { opacity:1; } Source: AngularJS