Skip to content

Instantly share code, notes, and snippets.

@dac09
Last active December 28, 2015 17:49
Show Gist options
  • Save dac09/7538532 to your computer and use it in GitHub Desktop.
Save dac09/7538532 to your computer and use it in GitHub Desktop.
Using ng-animate for animating views (fade in/out eg)
// --------- 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