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

docs($animate): describe your change... #11150

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: 13 additions & 2 deletions src/ngAnimate/animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,9 @@ angular.module('ngAnimate', ['ng'])
* Performs an inline animation on the element which applies the provided `to` and `from` CSS styles to the element.
* If any detected CSS transition, keyframe or JavaScript matches the provided `className` value then the animation
* will take on the provided styles. For example, if a transition animation is set for the given className then the
* provided `from` and `to` styles will be applied alongside the given transition. If a JavaScript animation is
* detected then the provided styles will be given in as function paramters.
* provided `from` and `to` styles will be applied alongside the given transition. If the CSS style provided in `from`
* does not have a corresponding CSS style in `to`, the CSS style in `from` is applied immediately. If a
* JavaScript animation is detected then the provided styles will be given in as function parameters.
*
* ```js
* ngModule.animation('.my-inline-animation', function() {
Expand All @@ -871,6 +872,16 @@ angular.module('ngAnimate', ['ng'])
* });
* ```
*
* ```js
* ngModule.animation('.my-inline-animation', function() {
* return {
* animate : function(element, className, {left: 0}, {left: 50}, done) {
* //styles
* }
* }
* });
* ```
*
* Below is a breakdown of each step that occurs during the `animate` animation:
*
* | Animation Step | What the element class attribute looks like |
Expand Down