You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
feat($animateCss): add support for temporary styles via cleanupStyles
Some animations make use of the `from` and `to` styling only for the
lifetime of the animation. This patch allows for those styles to be
removed once the animation is closed automatically within `$animateCss`.
Copy file name to clipboardExpand all lines: src/ngAnimate/animateCss.js
+30-2
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,7 @@ var ANIMATE_TIMER_KEY = '$$animateCss';
204
204
* * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a
205
205
* * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`)
206
206
* * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occuring on the classes being added and removed.)
207
+
* * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once the animation is closed. This is useful for when the styles are used purely for the sake of the animation and do not have a lasting visual effect on the element (e.g. a colapse and open animation). By default this value is set to `false`.
207
208
*
208
209
* @return {object} an object with start and end methods and details about the animation.
209
210
*
@@ -324,6 +325,15 @@ function createLocalCacheLookup() {
0 commit comments