Skip to content

dai-shi/angular-animate-change

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-animate-change Build Status

Angular directive for applying an animation class to an element whenever a value changes. Useful for applying attention-calling animation like flashes or shakes.

Installing

# npm
$ npm install angular-animate-change
# bower
$ bower install angular-animate-change

Setup

// node module exports the string 'animate-change' for convenience
angular.module('myApp', [
  require('angular-animate'),
  require('angular-animate-change')
]);
// otherwise, include the code first then the module name
angular.module('myApp', [
  'ngAnimate',
  'animate-change'
]);

API

animateChange (directive)
<span animate-change="value" change-class="flash"></span>

When $scope.value changes, the class 'flash' will be added. Animation classes will applied during the transition.

About

Animate an element when a value changes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%