Skip to content

Commit f9ba158

Browse files
Merge pull request #18 from angular/master
Update upstream
2 parents e22bcce + 5f76bc6 commit f9ba158

27 files changed

+287
-216
lines changed

docs/content/guide/animations.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ triggered:
232232
| {@link ng.directive:ngClass#animations ngClassEven / ngClassOdd} | add and remove |
233233
| {@link ng.directive:ngHide#animations ngHide} | add and remove (the `ng-hide` class) |
234234
| {@link ng.directive:ngShow#animations ngShow} | add and remove (the `ng-hide` class) |
235-
| {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) |
236-
| {@link ng.directive:form#animation-hooks form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) |
235+
| {@link ng.directive:ngModel#animations ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) |
236+
| {@link ng.directive:form#animations form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) |
237237
| {@link module:ngMessages#animations ngMessages} | add and remove (the `ng-active`/`ng-inactive` classes) |
238238

239239
For a full breakdown of the steps involved during each animation event, refer to the

src/Angular.js

+8
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,10 @@ var isAutoBootstrapAllowed = allowAutoBootstrap(window.document);
15941594
* document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
15951595
* would not be resolved to `3`.
15961596
*
1597+
* @example
1598+
*
1599+
* ### Simple Usage
1600+
*
15971601
* `ngApp` is the easiest, and most common way to bootstrap an application.
15981602
*
15991603
<example module="ngAppDemo" name="ng-app">
@@ -1610,6 +1614,10 @@ var isAutoBootstrapAllowed = allowAutoBootstrap(window.document);
16101614
</file>
16111615
</example>
16121616
*
1617+
* @example
1618+
*
1619+
* ### With `ngStrictDi`
1620+
*
16131621
* Using `ngStrictDi`, you would see something like this:
16141622
*
16151623
<example ng-app-included="true" name="strict-di">

src/ng/cacheFactory.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ function $CacheFactoryProvider() {
106106
*
107107
* @description
108108
* A cache object used to store and retrieve data, primarily used by
109-
* {@link $http $http} and the {@link ng.directive:script script} directive to cache
110-
* templates and other data.
109+
* {@link $templateRequest $templateRequest} and the {@link ng.directive:script script}
110+
* directive to cache templates and other data.
111111
*
112112
* ```js
113113
* angular.module('superCache')
@@ -360,9 +360,12 @@ function $CacheFactoryProvider() {
360360
* @this
361361
*
362362
* @description
363+
* `$templateCache` is a {@link $cacheFactory.Cache Cache object} created by the
364+
* {@link ng.$cacheFactory $cacheFactory}.
365+
*
363366
* The first time a template is used, it is loaded in the template cache for quick retrieval. You
364-
* can load templates directly into the cache in a `script` tag, or by consuming the
365-
* `$templateCache` service directly.
367+
* can load templates directly into the cache in a `script` tag, by using {@link $templateRequest},
368+
* or by consuming the `$templateCache` service directly.
366369
*
367370
* Adding via the `script` tag:
368371
*
@@ -373,8 +376,8 @@ function $CacheFactoryProvider() {
373376
* ```
374377
*
375378
* **Note:** the `script` tag containing the template does not need to be included in the `head` of
376-
* the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,
377-
* element with ng-app attribute), otherwise the template will be ignored.
379+
* the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (e.g.
380+
* element with {@link ngApp} attribute), otherwise the template will be ignored.
378381
*
379382
* Adding via the `$templateCache` service:
380383
*
@@ -397,8 +400,6 @@ function $CacheFactoryProvider() {
397400
* $templateCache.get('templateId.html')
398401
* ```
399402
*
400-
* See {@link ng.$cacheFactory $cacheFactory}.
401-
*
402403
*/
403404
function $TemplateCacheProvider() {
404405
this.$get = ['$cacheFactory', function($cacheFactory) {

src/ng/directive/form.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@ addSetValidityMethod({
415415
* submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`
416416
* to have access to the updated model.
417417
*
418-
* ## Animation Hooks
419-
*
418+
* @animations
420419
* Animations in ngForm are triggered when any of the associated CSS classes are added and removed.
421420
* These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any
422421
* other validations that are performed within the form. Animations in ngForm are similar to how

src/ng/directive/input.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2086,6 +2086,8 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
20862086
/**
20872087
* @ngdoc directive
20882088
* @name ngValue
2089+
* @restrict A
2090+
* @priority 100
20892091
*
20902092
* @description
20912093
* Binds the given expression to the value of the element.
@@ -2098,7 +2100,7 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
20982100
* It can also be used to achieve one-way binding of a given expression to an input element
20992101
* such as an `input[text]` or a `textarea`, when that element does not use ngModel.
21002102
*
2101-
* @element input
2103+
* @element ANY
21022104
* @param {string=} ngValue AngularJS expression, whose value will be bound to the `value` attribute
21032105
* and `value` property of the element.
21042106
*

src/ng/directive/ngChange.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/**
44
* @ngdoc directive
55
* @name ngChange
6+
* @restrict A
67
*
78
* @description
89
* Evaluate the given expression when the user changes the input.
@@ -21,7 +22,7 @@
2122
*
2223
* Note, this directive requires `ngModel` to be present.
2324
*
24-
* @element input
25+
* @element ANY
2526
* @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change
2627
* in input value.
2728
*

src/ng/directive/ngClass.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ function classDirective(name, selector) {
143143
* @ngdoc directive
144144
* @name ngClass
145145
* @restrict AC
146+
* @element ANY
146147
*
147148
* @description
148149
* The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding
@@ -178,14 +179,21 @@ function classDirective(name, selector) {
178179
* | {@link ng.$animate#addClass addClass} | just before the class is applied to the element |
179180
* | {@link ng.$animate#removeClass removeClass} | just before the class is removed from the element |
180181
*
181-
* @element ANY
182+
* ### ngClass and pre-existing CSS3 Transitions/Animations
183+
The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
184+
Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder
185+
any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure
186+
to view the step by step details of {@link $animate#addClass $animate.addClass} and
187+
{@link $animate#removeClass $animate.removeClass}.
188+
*
182189
* @param {expression} ngClass {@link guide/expression Expression} to eval. The result
183190
* of the evaluation can be a string representing space delimited class
184191
* names, an array, or a map of class names to boolean values. In the case of a map, the
185192
* names of the properties whose values are truthy will be added as css classes to the
186193
* element.
187194
*
188-
* @example Example that demonstrates basic bindings via ngClass directive.
195+
* @example
196+
* ### Basic
189197
<example name="ng-class">
190198
<file name="index.html">
191199
<p ng-class="{strike: deleted, bold: important, 'has-error': error}">Map Syntax Example</p>
@@ -275,7 +283,8 @@ function classDirective(name, selector) {
275283
</file>
276284
</example>
277285
278-
## Animations
286+
@example
287+
### Animations
279288
280289
The example below demonstrates how to perform animations using ngClass.
281290
@@ -313,14 +322,6 @@ function classDirective(name, selector) {
313322
});
314323
</file>
315324
</example>
316-
317-
318-
## ngClass and pre-existing CSS3 Transitions/Animations
319-
The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
320-
Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder
321-
any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure
322-
to view the step by step details of {@link $animate#addClass $animate.addClass} and
323-
{@link $animate#removeClass $animate.removeClass}.
324325
*/
325326
var ngClassDirective = classDirective('', true);
326327

0 commit comments

Comments
 (0)