Angular Animation
  • Introduction
  • Getting Started
    • Add Angular Animate
  • Animating Core Directives
    • CSS Transition
    • ng-class Add/Remove
    • ng-include Animation
    • ng-repeat Animation
    • ng-show/ng-hide Animation
    • Form Animation
    • ngMessages Animation
  • Animating Custom Directives
Powered by GitBook
On this page

Was this helpful?

  1. Animating Core Directives

ng-class Add/Remove

<div ng-class='{"myClass": isOpened}'></div>
/* add class */
.myClass-add{
    transition: color 1s linear;
}

.myClass, .myClass-add-active{
    color: blue;
}

/* remove class */
.myClass-remove{
    transition: color 1s linear;
}

.myClass-remove-active{
    color: blue;
}
PreviousCSS TransitionNextng-include Animation

Last updated 5 years ago

Was this helpful?