File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 267
267
* .message.ng-enter-prepare {
268
268
* opacity: 0;
269
269
* }
270
- *
271
270
* ```
272
271
*
272
+ * ### Animating between subsequent value changes
273
+ *
274
+ * Sometimes you need to animate between multiple (2 and more), different expression states, whose values
275
+ * don't necessary need to be known or referenced in CSS styles.
276
+ * Unless possible with more proper ["animation aware" directive](#directive-support), that specific
277
+ * use case can always be covered with {@link ngAnimate.directive:ngAnimateSwap} as can be seen in
278
+ * {@link ngAnimate.directive:ngAnimateSwap#examples this example}.
279
+ *
280
+ * Note that {@link ngAnimate.directive:ngAnimateSwap} is a *structural directive*, which means it
281
+ * creates a new instance of the element (including any other/child directives it may have) and
282
+ * links it to a new scope every time *swap* happens. In some cases this might not be desirable
283
+ * (e.g. for performance reasons, or when wish to retain internal state on the original
284
+ * element's instance).
285
+ *
273
286
* ## JavaScript-based Animations
274
287
*
275
288
* ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared
You can’t perform that action at this time.
0 commit comments