Last active
December 28, 2015 17:49
-
-
Save dac09/7538532 to your computer and use it in GitHub Desktop.
Using ng-animate for animating views (fade in/out eg)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --------- LESS ------------ | |
.view-enter.ng-enter{ | |
.transition(0.4s ease-in-out all); | |
opacity:0; | |
&.ng-enter-active{ | |
opacity:1; | |
} | |
} | |
// ------- Samething in css ----------- | |
.view-enter.ng-enter { | |
-webkit-transition: 0.4s ease-in-out all; | |
-moz-transition: 0.4s ease-in-out all; | |
-o-transition: 0.4s ease-in-out all; | |
transition: 0.4s ease-in-out all; | |
opacity: 0; | |
} | |
.view-enter.ng-enter.ng-enter-active { | |
opacity: 1; | |
} | |
// And the HTML: | |
// <div class="view-enter" ng-view=""></div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment