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

docs(ngAnimate): add animating any scope's variable change section #16582

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/ngAnimate/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,22 @@
* .message.ng-enter-prepare {
* opacity: 0;
* }
*
* ```
*
* ### Animating between value changes
*
* Sometimes you need to animate between different expression states, whose values
* don't necessary need to be known or referenced in CSS styles.
* Unless possible with another ["animation aware" directive](#directive-support), that specific
* use case can always be covered with {@link ngAnimate.directive:ngAnimateSwap} as can be seen in
* {@link ngAnimate.directive:ngAnimateSwap#examples this example}.
*
* Note that {@link ngAnimate.directive:ngAnimateSwap} is a *structural directive*, which means it
* creates a new instance of the element (including any other/child directives it may have) and
* links it to a new scope every time *swap* happens. In some cases this might not be desirable
* (e.g. for performance reasons, or when you wish to retain internal state on the original
* element instance).
*
* ## JavaScript-based Animations
*
* ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared
Expand Down