From 2c8bfd8a085695c3f46557fba6566d870b771573 Mon Sep 17 00:00:00 2001 From: Martin Staffa Date: Thu, 5 Oct 2017 17:16:13 +0200 Subject: [PATCH 1/4] docs(*): add / correct `@`-tags; fix headlines; add info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add / correct `@param`, `@restrict`, `@element`, `@priorìty` to directives - use `@animations` instead of manual headings - fix more incorrect h1 headings - fix incorrectly indented `` - add some info to $templateCache and $templateRequest --- docs/content/guide/animations.ngdoc | 4 +- src/Angular.js | 8 ++ src/ng/cacheFactory.js | 17 +-- src/ng/directive/form.js | 3 +- src/ng/directive/input.js | 4 +- src/ng/directive/ngChange.js | 3 +- src/ng/directive/ngClass.js | 23 ++-- src/ng/directive/ngCsp.js | 207 ++++++++++++++-------------- src/ng/directive/ngEventDirs.js | 83 ++++++----- src/ng/directive/ngInclude.js | 5 +- src/ng/directive/ngInit.js | 1 + src/ng/directive/ngList.js | 13 +- src/ng/directive/ngModel.js | 12 +- src/ng/directive/ngModelOptions.js | 2 + src/ng/directive/ngPluralize.js | 6 +- src/ng/directive/ngShowHide.js | 25 ++-- src/ng/directive/validators.js | 19 +++ src/ng/templateRequest.js | 6 + src/ngAnimate/module.js | 2 +- src/ngMessages/messages.js | 1 + src/ngResource/resource.js | 8 +- 21 files changed, 255 insertions(+), 197 deletions(-) diff --git a/docs/content/guide/animations.ngdoc b/docs/content/guide/animations.ngdoc index 7c9d33d3853b..669c8f92bfa3 100644 --- a/docs/content/guide/animations.ngdoc +++ b/docs/content/guide/animations.ngdoc @@ -232,8 +232,8 @@ triggered: | {@link ng.directive:ngClass#animations ngClassEven / ngClassOdd} | add and remove | | {@link ng.directive:ngHide#animations ngHide} | add and remove (the `ng-hide` class) | | {@link ng.directive:ngShow#animations ngShow} | add and remove (the `ng-hide` class) | -| {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) | -| {@link ng.directive:form#animation-hooks form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) | +| {@link ng.directive:ngModel#animations ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) | +| {@link ng.directive:form#animations form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) | | {@link module:ngMessages#animations ngMessages} | add and remove (the `ng-active`/`ng-inactive` classes) | For a full breakdown of the steps involved during each animation event, refer to the diff --git a/src/Angular.js b/src/Angular.js index 8df2c4809383..7c424897ff18 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1594,6 +1594,10 @@ var isAutoBootstrapAllowed = allowAutoBootstrap(window.document); * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}` * would not be resolved to `3`. * + * @example + * + * ### Simple Usage + * * `ngApp` is the easiest, and most common way to bootstrap an application. * @@ -1610,6 +1614,10 @@ var isAutoBootstrapAllowed = allowAutoBootstrap(window.document); * + * @example + * + * ### With `ngStrictDi` + * * Using `ngStrictDi`, you would see something like this: * diff --git a/src/ng/cacheFactory.js b/src/ng/cacheFactory.js index c4735d2738b9..1fe6284d4fe7 100644 --- a/src/ng/cacheFactory.js +++ b/src/ng/cacheFactory.js @@ -106,8 +106,8 @@ function $CacheFactoryProvider() { * * @description * A cache object used to store and retrieve data, primarily used by - * {@link $http $http} and the {@link ng.directive:script script} directive to cache - * templates and other data. + * {@link $templateRequest $templateRequest} and the {@link ng.directive:script script} + * directive to cache templates and other data. * * ```js * angular.module('superCache') @@ -360,9 +360,12 @@ function $CacheFactoryProvider() { * @this * * @description + * `$templateCache` is a {@link $cacheFactory.Cache Cache object} created by the + * {@link ng.$cacheFactory $cacheFactory}. + * * The first time a template is used, it is loaded in the template cache for quick retrieval. You - * can load templates directly into the cache in a `script` tag, or by consuming the - * `$templateCache` service directly. + * can load templates directly into the cache in a `script` tag, by using {@link $templateRequest}, + * or by consuming the `$templateCache` service directly. * * Adding via the `script` tag: * @@ -373,8 +376,8 @@ function $CacheFactoryProvider() { * ``` * * **Note:** the `script` tag containing the template does not need to be included in the `head` of - * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE, - * element with ng-app attribute), otherwise the template will be ignored. + * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (e.g. + * element with {@link ngApp} attribute), otherwise the template will be ignored. * * Adding via the `$templateCache` service: * @@ -397,8 +400,6 @@ function $CacheFactoryProvider() { * $templateCache.get('templateId.html') * ``` * - * See {@link ng.$cacheFactory $cacheFactory}. - * */ function $TemplateCacheProvider() { this.$get = ['$cacheFactory', function($cacheFactory) { diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index d05fd1c70011..1fc3b6f1cff1 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -415,8 +415,7 @@ addSetValidityMethod({ * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit` * to have access to the updated model. * - * ## Animation Hooks - * + * @animations * Animations in ngForm are triggered when any of the associated CSS classes are added and removed. * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any * other validations that are performed within the form. Animations in ngForm are similar to how diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 7497a190e00e..0a0c6e106c30 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -2086,6 +2086,8 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/; /** * @ngdoc directive * @name ngValue + * @restrict A + * @priority 100 * * @description * Binds the given expression to the value of the element. @@ -2098,7 +2100,7 @@ var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/; * It can also be used to achieve one-way binding of a given expression to an input element * such as an `input[text]` or a `textarea`, when that element does not use ngModel. * - * @element input + * @element ANY * @param {string=} ngValue AngularJS expression, whose value will be bound to the `value` attribute * and `value` property of the element. * diff --git a/src/ng/directive/ngChange.js b/src/ng/directive/ngChange.js index d77f14d482a0..89265809264f 100644 --- a/src/ng/directive/ngChange.js +++ b/src/ng/directive/ngChange.js @@ -3,6 +3,7 @@ /** * @ngdoc directive * @name ngChange + * @restrict A * * @description * Evaluate the given expression when the user changes the input. @@ -21,7 +22,7 @@ * * Note, this directive requires `ngModel` to be present. * - * @element input + * @element ANY * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change * in input value. * diff --git a/src/ng/directive/ngClass.js b/src/ng/directive/ngClass.js index e289a4c10441..e38c7c141938 100644 --- a/src/ng/directive/ngClass.js +++ b/src/ng/directive/ngClass.js @@ -143,6 +143,7 @@ function classDirective(name, selector) { * @ngdoc directive * @name ngClass * @restrict AC + * @element ANY * * @description * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding @@ -178,14 +179,21 @@ function classDirective(name, selector) { * | {@link ng.$animate#addClass addClass} | just before the class is applied to the element | * | {@link ng.$animate#removeClass removeClass} | just before the class is removed from the element | * - * @element ANY + * ### ngClass and pre-existing CSS3 Transitions/Animations + The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure. + Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder + any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure + to view the step by step details of {@link $animate#addClass $animate.addClass} and + {@link $animate#removeClass $animate.removeClass}. + * * @param {expression} ngClass {@link guide/expression Expression} to eval. The result * of the evaluation can be a string representing space delimited class * names, an array, or a map of class names to boolean values. In the case of a map, the * names of the properties whose values are truthy will be added as css classes to the * element. * - * @example Example that demonstrates basic bindings via ngClass directive. + * @example + * ### Basic

Map Syntax Example

@@ -275,7 +283,8 @@ function classDirective(name, selector) {
- ## Animations + @example + ### Animations The example below demonstrates how to perform animations using ngClass. @@ -313,14 +322,6 @@ function classDirective(name, selector) { });
- - - ## ngClass and pre-existing CSS3 Transitions/Animations - The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure. - Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder - any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure - to view the step by step details of {@link $animate#addClass $animate.addClass} and - {@link $animate#removeClass $animate.removeClass}. */ var ngClassDirective = classDirective('', true); diff --git a/src/ng/directive/ngCsp.js b/src/ng/directive/ngCsp.js index efe9215c22ef..1a5c611e74f8 100644 --- a/src/ng/directive/ngCsp.js +++ b/src/ng/directive/ngCsp.js @@ -78,6 +78,7 @@ * E.g.`` * * @example + * * This example shows how to apply the `ngCsp` directive to the `html` tag. ```html @@ -86,122 +87,122 @@ ... ``` - * @example - - - -
-
- - - {{ctrl.counter}} - -
-
- - - {{ctrl.evilError}} - -
-
-
- - angular.module('cspExample', []) - .controller('MainController', function MainController() { - this.counter = 0; - this.inc = function() { - this.counter++; - }; - this.evil = function() { - try { - eval('1+2'); // eslint-disable-line no-eval - } catch (e) { - this.evilError = e.message; - } - }; - }); - - - var util, webdriver; + + + +
+
+ + + {{ctrl.counter}} + +
- var incBtn = element(by.id('inc')); - var counter = element(by.id('counter')); - var evilBtn = element(by.id('evil')); - var evilError = element(by.id('evilError')); +
+ + + {{ctrl.evilError}} + +
+
+
+ + angular.module('cspExample', []) + .controller('MainController', function MainController() { + this.counter = 0; + this.inc = function() { + this.counter++; + }; + this.evil = function() { + try { + eval('1+2'); // eslint-disable-line no-eval + } catch (e) { + this.evilError = e.message; + } + }; + }); + + + var util, webdriver; - function getAndClearSevereErrors() { - return browser.manage().logs().get('browser').then(function(browserLog) { - return browserLog.filter(function(logEntry) { - return logEntry.level.value > webdriver.logging.Level.WARNING.value; - }); - }); - } + var incBtn = element(by.id('inc')); + var counter = element(by.id('counter')); + var evilBtn = element(by.id('evil')); + var evilError = element(by.id('evilError')); - function clearErrors() { - getAndClearSevereErrors(); - } + function getAndClearSevereErrors() { + return browser.manage().logs().get('browser').then(function(browserLog) { + return browserLog.filter(function(logEntry) { + return logEntry.level.value > webdriver.logging.Level.WARNING.value; + }); + }); + } - function expectNoErrors() { - getAndClearSevereErrors().then(function(filteredLog) { - expect(filteredLog.length).toEqual(0); - if (filteredLog.length) { - console.log('browser console errors: ' + util.inspect(filteredLog)); - } - }); - } + function clearErrors() { + getAndClearSevereErrors(); + } - function expectError(regex) { - getAndClearSevereErrors().then(function(filteredLog) { - var found = false; - filteredLog.forEach(function(log) { - if (log.message.match(regex)) { - found = true; - } - }); - if (!found) { - throw new Error('expected an error that matches ' + regex); - } - }); + function expectNoErrors() { + getAndClearSevereErrors().then(function(filteredLog) { + expect(filteredLog.length).toEqual(0); + if (filteredLog.length) { + console.log('browser console errors: ' + util.inspect(filteredLog)); } + }); + } - beforeEach(function() { - util = require('util'); - webdriver = require('selenium-webdriver'); + function expectError(regex) { + getAndClearSevereErrors().then(function(filteredLog) { + var found = false; + filteredLog.forEach(function(log) { + if (log.message.match(regex)) { + found = true; + } }); - - // For now, we only test on Chrome, - // as Safari does not load the page with Protractor's injected scripts, - // and Firefox webdriver always disables content security policy (#6358) - if (browser.params.browser !== 'chrome') { - return; + if (!found) { + throw new Error('expected an error that matches ' + regex); } + }); + } - it('should not report errors when the page is loaded', function() { - // clear errors so we are not dependent on previous tests - clearErrors(); - // Need to reload the page as the page is already loaded when - // we come here - browser.driver.getCurrentUrl().then(function(url) { - browser.get(url); - }); - expectNoErrors(); - }); + beforeEach(function() { + util = require('util'); + webdriver = require('selenium-webdriver'); + }); - it('should evaluate expressions', function() { - expect(counter.getText()).toEqual('0'); - incBtn.click(); - expect(counter.getText()).toEqual('1'); - expectNoErrors(); - }); + // For now, we only test on Chrome, + // as Safari does not load the page with Protractor's injected scripts, + // and Firefox webdriver always disables content security policy (#6358) + if (browser.params.browser !== 'chrome') { + return; + } - it('should throw and report an error when using "eval"', function() { - evilBtn.click(); - expect(evilError.getText()).toMatch(/Content Security Policy/); - expectError(/Content Security Policy/); - }); - -
+ it('should not report errors when the page is loaded', function() { + // clear errors so we are not dependent on previous tests + clearErrors(); + // Need to reload the page as the page is already loaded when + // we come here + browser.driver.getCurrentUrl().then(function(url) { + browser.get(url); + }); + expectNoErrors(); + }); + + it('should evaluate expressions', function() { + expect(counter.getText()).toEqual('0'); + incBtn.click(); + expect(counter.getText()).toEqual('1'); + expectNoErrors(); + }); + + it('should throw and report an error when using "eval"', function() { + evilBtn.click(); + expect(evilError.getText()).toMatch(/Content Security Policy/); + expectError(/Content Security Policy/); + }); +
+
*/ // `ngCsp` is not implemented as a proper directive any more, because we need it be processed while diff --git a/src/ng/directive/ngEventDirs.js b/src/ng/directive/ngEventDirs.js index 8c21e0ac4748..833cdce9ca14 100644 --- a/src/ng/directive/ngEventDirs.js +++ b/src/ng/directive/ngEventDirs.js @@ -3,13 +3,14 @@ /** * @ngdoc directive * @name ngClick + * @restrict A + * @element ANY + * @priority 0 * * @description * The ngClick directive allows you to specify custom behavior when * an element is clicked. * - * @element ANY - * @priority 0 * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon * click. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -79,12 +80,13 @@ forEach( /** * @ngdoc directive * @name ngDblclick + * @restrict A + * @element ANY + * @priority 0 * * @description * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event. * - * @element ANY - * @priority 0 * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon * a dblclick. (The Event object is available as `$event`) * @@ -103,12 +105,13 @@ forEach( /** * @ngdoc directive * @name ngMousedown + * @restrict A + * @element ANY + * @priority 0 * * @description * The ngMousedown directive allows you to specify custom behavior on mousedown event. * - * @element ANY - * @priority 0 * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon * mousedown. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -127,12 +130,13 @@ forEach( /** * @ngdoc directive * @name ngMouseup + * @restrict A + * @element ANY + * @priority 0 * * @description * Specify custom behavior on mouseup event. * - * @element ANY - * @priority 0 * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon * mouseup. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -150,12 +154,13 @@ forEach( /** * @ngdoc directive * @name ngMouseover + * @restrict A + * @element ANY + * @priority 0 * * @description * Specify custom behavior on mouseover event. * - * @element ANY - * @priority 0 * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon * mouseover. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -174,12 +179,13 @@ forEach( /** * @ngdoc directive * @name ngMouseenter + * @restrict A + * @element ANY + * @priority 0 * * @description * Specify custom behavior on mouseenter event. * - * @element ANY - * @priority 0 * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -198,12 +204,13 @@ forEach( /** * @ngdoc directive * @name ngMouseleave + * @restrict A + * @element ANY + * @priority 0 * * @description * Specify custom behavior on mouseleave event. * - * @element ANY - * @priority 0 * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -222,12 +229,13 @@ forEach( /** * @ngdoc directive * @name ngMousemove + * @restrict A + * @element ANY + * @priority 0 * * @description * Specify custom behavior on mousemove event. * - * @element ANY - * @priority 0 * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon * mousemove. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -246,12 +254,13 @@ forEach( /** * @ngdoc directive * @name ngKeydown + * @restrict A + * @element ANY + * @priority 0 * * @description * Specify custom behavior on keydown event. * - * @element ANY - * @priority 0 * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.) * @@ -268,12 +277,13 @@ forEach( /** * @ngdoc directive * @name ngKeyup + * @restrict A + * @element ANY + * @priority 0 * * @description * Specify custom behavior on keyup event. * - * @element ANY - * @priority 0 * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.) * @@ -295,11 +305,12 @@ forEach( /** * @ngdoc directive * @name ngKeypress + * @restrict A + * @element ANY * * @description * Specify custom behavior on keypress event. * - * @element ANY * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon * keypress. ({@link guide/expression#-event- Event object is available as `$event`} * and can be interrogated for keyCode, altKey, etc.) @@ -317,6 +328,9 @@ forEach( /** * @ngdoc directive * @name ngSubmit + * @restrict A + * @element form + * @priority 0 * * @description * Enables binding AngularJS expressions to onsubmit events. @@ -332,8 +346,6 @@ forEach( * for a detailed discussion of when `ngSubmit` may be triggered. * * - * @element form - * @priority 0 * @param {expression} ngSubmit {@link guide/expression Expression} to eval. * ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -380,6 +392,9 @@ forEach( /** * @ngdoc directive * @name ngFocus + * @restrict A + * @element window, input, select, textarea, a + * @priority 0 * * @description * Specify custom behavior on focus event. @@ -388,8 +403,6 @@ forEach( * AngularJS executes the expression using `scope.$evalAsync` if the event is fired * during an `$apply` to ensure a consistent state. * - * @element window, input, select, textarea, a - * @priority 0 * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon * focus. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -400,6 +413,9 @@ forEach( /** * @ngdoc directive * @name ngBlur + * @restrict A + * @element window, input, select, textarea, a + * @priority 0 * * @description * Specify custom behavior on blur event. @@ -412,8 +428,6 @@ forEach( * AngularJS executes the expression using `scope.$evalAsync` if the event is fired * during an `$apply` to ensure a consistent state. * - * @element window, input, select, textarea, a - * @priority 0 * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon * blur. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -424,12 +438,13 @@ forEach( /** * @ngdoc directive * @name ngCopy + * @restrict A + * @element window, input, select, textarea, a + * @priority 0 * * @description * Specify custom behavior on copy event. * - * @element window, input, select, textarea, a - * @priority 0 * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon * copy. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -445,12 +460,13 @@ forEach( /** * @ngdoc directive * @name ngCut + * @restrict A + * @element window, input, select, textarea, a + * @priority 0 * * @description * Specify custom behavior on cut event. * - * @element window, input, select, textarea, a - * @priority 0 * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon * cut. ({@link guide/expression#-event- Event object is available as `$event`}) * @@ -466,12 +482,13 @@ forEach( /** * @ngdoc directive * @name ngPaste + * @restrict A + * @element window, input, select, textarea, a + * @priority 0 * * @description * Specify custom behavior on paste event. * - * @element window, input, select, textarea, a - * @priority 0 * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon * paste. ({@link guide/expression#-event- Event object is available as `$event`}) * diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js index 9f81f1477262..b3bfe7dc1176 100644 --- a/src/ng/directive/ngInclude.js +++ b/src/ng/directive/ngInclude.js @@ -4,6 +4,8 @@ * @ngdoc directive * @name ngInclude * @restrict ECA + * @scope + * @priority -400 * * @description * Fetches, compiles and includes an external HTML fragment. @@ -30,9 +32,6 @@ * * The enter and leave animation occur concurrently. * - * @scope - * @priority 400 - * * @param {string} ngInclude|src AngularJS expression evaluating to URL. If the source is a string constant, * make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`. * @param {string=} onload Expression to evaluate when a new partial is loaded. diff --git a/src/ng/directive/ngInit.js b/src/ng/directive/ngInit.js index 8e4318c10ef1..d88855fb3974 100644 --- a/src/ng/directive/ngInit.js +++ b/src/ng/directive/ngInit.js @@ -4,6 +4,7 @@ * @ngdoc directive * @name ngInit * @restrict AC + * @priority 450 * * @description * The `ngInit` directive allows you to evaluate an expression in the diff --git a/src/ng/directive/ngList.js b/src/ng/directive/ngList.js index a0f493b9a844..5e6e58f91e08 100644 --- a/src/ng/directive/ngList.js +++ b/src/ng/directive/ngList.js @@ -4,6 +4,10 @@ /** * @ngdoc directive * @name ngList + * @restrict A + * @priority 100 + * + * @param {string=} ngList optional delimiter that should be used to split the value. * * @description * Text input that converts between a delimited string and an array of strings. The default @@ -19,7 +23,8 @@ * when joining the list items back together) and whitespace around each list item is stripped * before it is added to the model. * - * ### Example with Validation + * @example + * ### Validation * * * @@ -66,7 +71,9 @@ * * * - * ### Example - splitting on newline + * @example + * ### Splitting on newline + * * * * @@ -82,8 +89,6 @@ * * * - * @element input - * @param {string=} ngList optional delimiter that should be used to split the value. */ var ngListDirective = function() { return { diff --git a/src/ng/directive/ngModel.js b/src/ng/directive/ngModel.js index d7e95b49ed17..5e9aa4a38628 100644 --- a/src/ng/directive/ngModel.js +++ b/src/ng/directive/ngModel.js @@ -27,7 +27,6 @@ var ngModelMinErr = minErr('ngModel'); /** * @ngdoc type * @name ngModel.NgModelController - * * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue * is set. @@ -1092,9 +1091,9 @@ addSetValidityMethod({ /** * @ngdoc directive * @name ngModel - * - * @element input + * @restrict A * @priority 1 + * @param {expression} ngModel assignable {@link guide/expression Expression} to bind to. * * @description * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a @@ -1171,8 +1170,7 @@ addSetValidityMethod({ * * Keep in mind that ngAnimate can detect each of these classes when added and removed. * - * ### Animation Hooks - * + * @animations * Animations within models are triggered when any of the associated CSS classes are added and removed * on the input element which is attached to the model. These classes include: `.ng-pristine`, `.ng-dirty`, * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself. @@ -1196,6 +1194,7 @@ addSetValidityMethod({ * * * @example + * ### Basic Usage *