Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7e6660c

Browse files
committed
fixup! feat($animate): add support for customFilter
1 parent 679eaf0 commit 7e6660c

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

docs/content/guide/animations.ngdoc

+11-2
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,17 @@ app.config(function($animateProvider) {
307307
```
308308

309309
The `customFilter` approach generally gives a big speed boost compared to other strategies, because
310-
the matching is done before other animation disabling strategies are checked. However, the filter
311-
function has to be kept as lean as possible, since it will be executed for each animation.
310+
the matching is done before other animation disabling strategies are checked.
311+
312+
<div class="alert alert-success">
313+
**Best Practice:**
314+
Keep the filtering function as lean as possible, because it will be called for each DOM
315+
action (e.g. insertion, removal, class change) performed by "animation-aware" directives.
316+
See {@link guide/animations#which-directives-support-animations- here} for a list of built-in
317+
directives that support animations.
318+
Performing computationally expensive or time-consuming operations on each call of the
319+
filtering function can make your animations sluggish.
320+
</div>
312321

313322
### During the config: {@link $animateProvider#classNameFilter $animateProvider.classNameFilter()}
314323

src/ng/animate.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,12 @@ var $AnimateProvider = ['$provide', /** @this */ function($provide) {
250250
*
251251
* <div class="alert alert-success">
252252
* **Best Practice:**
253-
* The filtering function will be called for each animation, so try to keep it as lean as
254-
* possible. Performing computationally expensive or time-consuming operations can make your
255-
* animations sluggish.
253+
* Keep the filtering function as lean as possible, because it will be called for each DOM
254+
* action (e.g. insertion, removal, class change) performed by "animation-aware" directives.
255+
* See {@link guide/animations#which-directives-support-animations- here} for a list of built-in
256+
* directives that support animations.
257+
* Performing computationally expensive or time-consuming operations on each call of the
258+
* filtering function can make your animations sluggish.
256259
* </div>
257260
*
258261
* **Note:** If present, `customFilter` will be checked before

0 commit comments

Comments
 (0)