If you want to enable animation for certain elements (as opposed to disabling them for certain elements), you can use $ animateProvider to configure elements with a specific class name (or regular expression) for animation.
In the code below, animations for elements that have an angular-animate class will be included:
var myApp = angular.module("MyApp", ["ngAnimate"]); myApp.config(function($animateProvider) { $animateProvider.classNameFilter(/angular-animate/); })
Here is a markup example that includes the angular-animate to enable animation:
<div ng-init="items=[1,2,3,4,5,6,7,8,9]"> <input placeholder="Filter with animations." ng-model="f" /> <div class="my-repeat-animation angular-animate" ng-repeat="item in items | filter:f track by item" > {{item}} </div> </div>
The Plunker example is borrowed and modified from this blog , where only the first filter has animation (due to the angular-animate ).
Note that I am using angular-animate as an example, and it is fully customizable using the .classNameFilter function.
Gloopy Jul 02 '14 at 22:31 2014-07-02 22:31
source share