-
Zuriel
javascript angularjs angularjs-scope ng-animate tweenmax
angular.module(‘AppAnimations’, []) .animation(‘ecocool-in’, [‘$rootScope’, function() {return {setup: function(element) {TweenMax.set(element, {opacity:0, right:’100px’, width:’100%’, position:’aboslute’})TweenMax.set($(‘body’), {overflow: ‘hidden’})},start: function(element, done) {TweenMax.to(element, .6, {delay:.6,opacity:1, right:0, ease:Power2.easeOut, onComplete:function() {done();TweenMax.set(element, {opacity:1, right:0, width:’100%’, position:’relative’})TweenMax.set($(‘body’), {overfl
-
Agzam
angularjs ng-animate
I was playing around with recently added angular.js animations feature, and this doesn’t work as desired<style>.myDiv{width:400px;height:200px;background-color:red;}.fadeIn-setup,.fadeOut-setup {-webkit-transition: 1s linear opacity;-moz-transition: 1s linear opacity;-o-transition: 1s linear opacity;transition: 1s linear opacity;}.fadeIn-setup{opacity:0;}.fadeOut-setup{opacity:1;}.fadeIn-setup.fadeIn-start {opacity: 1;}.fadeOut-setup.fadeOut-start{opacity:0;} </style><div ng-app&g