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

Commit b9ab887

Browse files
committedOct 5, 2015
docs(ngAnimate): simplify $animateCss example code
1 parent 00bf218 commit b9ab887

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed
 

‎src/ngAnimate/module.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,12 @@
363363
* ```js
364364
* myModule.animation('.slide', ['$animateCss', function($animateCss) {
365365
* return {
366-
* enter: function(element, doneFn) {
366+
* enter: function(element) {
367367
* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.
368-
* var runner = $animateCss(element, {
368+
* return $animateCss(element, {
369369
* event: 'enter',
370370
* structural: true
371-
* }).start();
372-
* runner.done(doneFn);
371+
* });
373372
* }
374373
* }
375374
* }]);
@@ -384,16 +383,14 @@
384383
* ```js
385384
* myModule.animation('.slide', ['$animateCss', function($animateCss) {
386385
* return {
387-
* enter: function(element, doneFn) {
388-
* var runner = $animateCss(element, {
386+
* enter: function(element) {
387+
* return $animateCss(element, {
389388
* event: 'enter',
390389
* structural: true,
391390
* addClass: 'maroon-setting',
392391
* from: { height:0 },
393392
* to: { height: 200 }
394-
* }).start();
395-
*
396-
* runner.done(doneFn);
393+
* });
397394
* }
398395
* }
399396
* }]);

0 commit comments

Comments
 (0)