Questions tagged [ng-animate]

The ngAnimate module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via callback hooks. Animations are not enabled by default, however, by including ngAnimate then the animation hooks are enabled for an AngularJS app.

Usage

Simply put, there are two ways to make use of animations when ngAnimate is used: by using CSS and JavaScript. The former works purely based using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via module.animation(). For both CSS and JS animations the sole requirement is to have a matching CSS class that exists both in the registered animation and within the HTML element that the animation will be triggered on.

Reference - AngularJS ngAnimate docs.

Tutorial - How to use AngularJS with NgAnimate

Github - https://github.com/angular/angular.js/tree/master/src/ngAnimate

NPM package - https://www.npmjs.com/package/ng-animate

From Wikipedia

ng-animate

A module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.

Since ng-* attributes are not valid in HTML specifications, data-ng-* can also be used as a prefix. For example, both ng-app and data-ng-app are valid in AngularJS.

648 questions
14
votes
2 answers

Angular 1.x ngAnimate in Shadow DOM doesn't register animation times or add enter/leave classes

I've been trying to work out solutions for a few hours now - all the duplicates in SO don't seem to work for me as they mostly recommend either trying different versions of ng-animate/angular or adding the transition/animation in the relevant…
casraf
  • 21,085
  • 9
  • 56
  • 91
14
votes
2 answers

AngularJS animation card flip

I am trying to use the new AngularJS way of doing animations between page transitions and would like to incorporate a card flip (like http://jsfiddle.net/nicooprat/GDdtS/) body { background: #ccc; } .flip { -webkit-perspective: 800; width:…
Jonovono
  • 3,437
  • 5
  • 42
  • 64
14
votes
4 answers

ngAnimate on ngShow. Preventing animation when it starts first time

I was playing around with recently added angular.js animations feature, and this doesn't work as desired