3
3
* @name ngAnimate
4
4
* @description
5
5
*
6
- * ngAnimate
7
- * =========
6
+ * # ngAnimate
8
7
*
9
- * The ngAnimate module is an optional module that comes packed with AngularJS that can be included within an AngularJS
10
- * application to provide support for CSS and JavaScript animation hooks.
8
+ * `ngAnimate` is an optional module that provides CSS and JavaScript animation hooks.
11
9
*
12
- * To make use of animations with AngularJS, the `angular-animate.js` JavaScript file must be included into your application
13
- * and the `ngAnimate` module must be included as a dependency.
10
+ * {@installModule animate}
14
11
*
15
- * <pre>
16
- * angular.module('App', ['ngAnimate']);
17
- * </pre>
12
+ * # Usage
18
13
*
19
- * Then, to see animations in action, all that is required is to define the appropriate CSS classes
14
+ * To see animations in action, all that is required is to define the appropriate CSS classes
20
15
* or to register a JavaScript animation via the $animation service. The directives that support animation automatically are:
21
16
* `ngRepeat`, `ngInclude`, `ngSwitch`, `ngShow`, `ngHide` and `ngView`. Custom directives can take advantage of animation
22
17
* by using the `$animate` service.
46
41
* -o-transition:0.5s linear all;
47
42
* transition:0.5s linear all;
48
43
* }
49
- *
44
+ *
50
45
* .slide.ng-enter { } /* starting animations for enter */
51
46
* .slide.ng-enter-active { } /* terminal animations for enter */
52
47
* .slide.ng-leave { } /* starting animations for leave */
@@ -190,11 +185,13 @@ angular.module('ngAnimate', ['ng'])
190
185
* @name ngAnimate.$animateProvider
191
186
* @description
192
187
*
193
- * The $AnimationProvider provider allows developers to register and access custom JavaScript animations directly inside
188
+ * The ` $AnimationProvider` allows developers to register and access custom JavaScript animations directly inside
194
189
* of a module. When an animation is triggered, the $animate service will query the $animation function to find any
195
190
* animations that match the provided name value.
196
191
*
197
- * Please visit the {@link ngAnimate ngAnimate} module overview page learn more about how to use animations in your application.
192
+ * Requires the {@link ngAnimate `ngAnimate`} module to be installed.
193
+ *
194
+ * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
198
195
*
199
196
*/
200
197
. config ( [ '$provide' , '$animateProvider' , function ( $provide , $animateProvider ) {
@@ -206,7 +203,7 @@ angular.module('ngAnimate', ['ng'])
206
203
var rootAnimateState = { running :true } ;
207
204
$provide . decorator ( '$animate' , [ '$delegate' , '$injector' , '$sniffer' , '$rootElement' , '$timeout' ,
208
205
function ( $delegate , $injector , $sniffer , $rootElement , $timeout ) {
209
-
206
+
210
207
$rootElement . data ( NG_ANIMATE_STATE , rootAnimateState ) ;
211
208
212
209
function lookup ( name ) {
@@ -248,7 +245,9 @@ angular.module('ngAnimate', ['ng'])
248
245
* The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives
249
246
* will work out of the box without any extra configuration.
250
247
*
251
- * Please visit the {@link ngAnimate ngAnimate} module overview page learn more about how to use animations in your application.
248
+ * Requires the {@link ngAnimate `ngAnimate`} module to be installed.
249
+ *
250
+ * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.
252
251
*
253
252
*/
254
253
return {
0 commit comments