diff options
| author | Matias Niemelä | 2013-06-18 13:59:57 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-07-26 23:49:54 -0700 |
| commit | 81923f1e41560327f7de6e8fddfda0d2612658f3 (patch) | |
| tree | bbf8151bddf4d026f8f5fa3196b84a45ecd9c858 /docs/src/ngdoc.js | |
| parent | 11521a4cde689c2bd6aaa227b1f45cb3fb53725b (diff) | |
| download | angular.js-81923f1e41560327f7de6e8fddfda0d2612658f3.tar.bz2 | |
feat(ngAnimate): complete rewrite of animations
- ngAnimate directive is gone and was replaced with class based animations/transitions
- support for triggering animations on css class additions and removals
- done callback was added to all animation apis
- $animation and $animator where merged into a single $animate service with api:
- $animate.enter(element, parent, after, done);
- $animate.leave(element, done);
- $animate.move(element, parent, after, done);
- $animate.addClass(element, className, done);
- $animate.removeClass(element, className, done);
BREAKING CHANGE: too many things changed, we'll write up a separate doc with migration instructions
Diffstat (limited to 'docs/src/ngdoc.js')
| -rw-r--r-- | docs/src/ngdoc.js | 67 |
1 files changed, 13 insertions, 54 deletions
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 394510c5..eb26bbf2 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -494,6 +494,19 @@ Doc.prototype = { html_usage_parameters: function(dom) { var self = this; var params = this.param ? this.param : []; + if(this.animations) { + dom.h('Animations', this.animations, function(animations){ + dom.html('<ul>'); + var animations = animations.split("\n"); + animations.forEach(function(ani) { + dom.html('<li>'); + dom.text(ani); + dom.html('</li>'); + }); + dom.html('</ul>'); + }); + dom.html('<a href="api/ngAnimate.$animate">Click here</a> to learn more about the steps involved in the animation.'); + } if(params.length > 0) { dom.html('<h2 id="parameters">Parameters</h2>'); dom.html('<table class="variables-matrix table table-bordered table-striped">'); @@ -538,18 +551,6 @@ Doc.prototype = { dom.html('</tbody>'); dom.html('</table>'); } - if(this.animations) { - dom.h('Animations', this.animations, function(animations){ - dom.html('<ul>'); - var animations = animations.split("\n"); - animations.forEach(function(ani) { - dom.html('<li>'); - dom.text(ani); - dom.html('</li>'); - }); - dom.html('</ul>'); - }); - } }, html_usage_returns: function(dom) { @@ -665,48 +666,6 @@ Doc.prototype = { dom.text('</' + element + '>'); }); } - if(self.animations) { - var animations = [], matches = self.animations.split("\n"); - matches.forEach(function(ani) { - var name = ani.match(/^\s*(.+?)\s*-/)[1]; - animations.push(name); - }); - - dom.html('with <span id="animations">animations</span>'); - var comment; - if(animations.length == 1) { - comment = 'The ' + animations[0] + ' animation is supported'; - } - else { - var rhs = animations[animations.length-1]; - var lhs = ''; - for(var i=0;i<animations.length-1;i++) { - if(i>0) { - lhs += ', '; - } - lhs += animations[i]; - } - comment = 'The ' + lhs + ' and ' + rhs + ' animations are supported'; - } - var element = self.element || 'ANY'; - dom.code(function() { - dom.text('//' + comment + "\n"); - dom.text('<' + element + ' '); - dom.text(dashCase(self.shortName)); - renderParams('\n ', '="', '"', true); - dom.text(' ng-animate="{'); - animations.forEach(function(ani, index) { - if (index) { - dom.text(', '); - } - dom.text(ani + ': \'' + ani + '-animation\''); - }); - dom.text('}">\n ...\n'); - dom.text('</' + element + '>'); - }); - - dom.html('<a href="api/ng.$animator#Methods">Click here</a> to learn more about the steps involved in the animation.'); - } } self.html_usage_directiveInfo(dom); self.html_usage_parameters(dom); |
