Skip to content
Permalink
Browse files

docs($animate): clarify info about from and to for animate()

Closes #11150
  • Loading branch information
Narretz committed Jan 12, 2016
1 parent 5afd545 commit a31c082de6dab64394b9a4d19c1a16e37b946887
Showing with 16 additions and 4 deletions.
  1. +16 −4 src/ng/animate.js
@@ -552,10 +552,22 @@ var $AnimateProvider = ['$provide', function($provide) {
* @kind function
*
* @description 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 parameters into the `animate` method (or as apart of the `options` parameter).
* 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 the CSS style provided in `from` does not have a corresponding
* style in `to`, the style in `from` is applied immediately, and no animation is run.
* If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate`
* method (or as part of the `options` parameter):
*
* ```js
* ngModule.animation('.my-inline-animation', function() {
* return {
* animate : function(element, className, from, to, done) {
* //styles
* }
* }
* });
* ```
*
* @param {DOMElement} element the element which the CSS styles will be applied to
* @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.

0 comments on commit a31c082

Please sign in to comment.
You can’t perform that action at this time.