This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 275275 * .message.ng-enter-prepare {
276276 * opacity: 0;
277277 * }
278- *
279278 * ```
280279 *
280+ * ### Animating between value changes
281+ *
282+ * Sometimes you need to animate between different expression states, whose values
283+ * don't necessary need to be known or referenced in CSS styles.
284+ * Unless possible with another ["animation aware" directive](#directive-support), that specific
285+ * use case can always be covered with {@link ngAnimate.directive:ngAnimateSwap} as can be seen in
286+ * {@link ngAnimate.directive:ngAnimateSwap#examples this example}.
287+ *
288+ * Note that {@link ngAnimate.directive:ngAnimateSwap} is a *structural directive*, which means it
289+ * creates a new instance of the element (including any other/child directives it may have) and
290+ * links it to a new scope every time *swap* happens. In some cases this might not be desirable
291+ * (e.g. for performance reasons, or when you wish to retain internal state on the original
292+ * element instance).
293+ *
281294 * ## JavaScript-based Animations
282295 *
283296 * 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