docs(*): renaming incorrect widget references to control or directive

This commit is contained in:
Igor Minar 2012-03-12 21:30:03 -07:00
parent f59e4b11f1
commit afe617a647
8 changed files with 31 additions and 38 deletions

View file

@ -7,16 +7,18 @@
*
* @property {boolean} $pristine True if user has not interacted with the form yet.
* @property {boolean} $dirty True if user has already interacted with the form.
* @property {boolean} $valid True if all of the containg widgets are valid.
* @property {boolean} $invalid True if at least one containing widget is invalid.
* @property {boolean} $valid True if all of the containg forms and controls are valid.
* @property {boolean} $invalid True if at least one containing control or form is invalid.
*
* @property {Object} $error Is an object hash, containing references to all invalid widgets, where
* @property {Object} $error Is an object hash, containing references to all invalid controls or
* forms, where:
*
* - keys are error ids (such as `REQUIRED`, `URL` or `EMAIL`),
* - values are arrays of widgets that are invalid with given error.
* - keys are validation tokens (error names) such as `REQUIRED`, `URL` or `EMAIL`),
* - values are arrays of controls or forms that are invalid with given error.
*
* @description
* `FormController` keeps track of all its widgets as well as state of them form, such as being valid/invalid or dirty/pristine.
* `FormController` keeps track of all its controls and nested forms as well as state of them,
* such as being valid/invalid or dirty/pristine.
*
* Each {@link angular.module.ng.$compileProvider.directive.form form} directive creates an instance
* of `FormController`.

View file

@ -14,7 +14,7 @@ var inputType = {
* Standard HTML text input with angular data binding.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
* minlength.
@ -81,7 +81,7 @@ var inputType = {
* error if not a valid number.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} min Sets the `MIN` validation error key if the value entered is less then `min`.
* @param {string=} max Sets the `MAX` validation error key if the value entered is greater then `min`.
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
@ -149,7 +149,7 @@ var inputType = {
* valid URL.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
* minlength.
@ -214,7 +214,7 @@ var inputType = {
* address.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
* minlength.
@ -277,7 +277,7 @@ var inputType = {
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string} value The value to which the expression should be set when selected.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} ng-change Angular expression to be executed when input changes due to user
* interaction with the input element.
*
@ -317,7 +317,7 @@ var inputType = {
* HTML checkbox.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} ng-true-value The value to which the expression should be set when selected.
* @param {string=} ng-false-value The value to which the expression should be set when not selected.
* @param {string=} ng-change Angular expression to be executed when input changes due to user
@ -594,12 +594,12 @@ function checkboxInputType(scope, element, attr, ctrl) {
* @name angular.module.ng.$compileProvider.directive.textarea
*
* @description
* HTML textarea element widget with angular data-binding. The data-binding and validation
* HTML textarea element control with angular data-binding. The data-binding and validation
* properties of this element are exactly the same as those of the
* {@link angular.module.ng.$compileProvider.directive.input input element}.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
* minlength.
@ -619,11 +619,11 @@ function checkboxInputType(scope, element, attr, ctrl) {
* @restrict E
*
* @description
* HTML input element widget with angular data-binding. Input widget follows HTML5 input types
* HTML input element control with angular data-binding. Input control follows HTML5 input types
* and polyfills the HTML5 validation behavior for older browsers.
*
* @param {string} ng-model Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the widgets is published.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
* minlength.
@ -725,8 +725,8 @@ var inputDirective = [function() {
* @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController
*
* @property {string} viewValue Actual string value in the view.
* @property {*} modelValue The value in the model, that the widget is bound to.
* @property {Array.<Function>} parsers Whenever the widget reads value from the DOM, it executes
* @property {*} modelValue The value in the model, that the control is bound to.
* @property {Array.<Function>} parsers Whenever the control reads value from the DOM, it executes
* all of these functions to sanitize / convert the value as well as validate.
*
* @property {Array.<Function>} formatters Whenever the model value changes, it executes all of
@ -734,10 +734,10 @@ var inputDirective = [function() {
*
* @property {Object} error An bject hash with all errors as keys.
*
* @property {boolean} pristine True if user has not interacted with the widget yet.
* @property {boolean} dirty True if user has already interacted with the widget.
* @property {boolean} pristine True if user has not interacted with the control yet.
* @property {boolean} dirty True if user has already interacted with the control.
* @property {boolean} valid True if there is no error.
* @property {boolean} invalid True if at least one error on the widget.
* @property {boolean} invalid True if at least one error on the control.
*
* @description
*
@ -764,7 +764,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel',
* @methodOf angular.module.ng.$compileProvider.directive.ng-model.NgModelController
*
* @description
* Change the validity state, and notifies the form when the widget changes validity. (i.e. it
* Change the validity state, and notifies the form when the control changes validity. (i.e. it
* does not notify form if given validator is already marked as invalid).
*
* This method should be called by validators - i.e. the parser or formatter functions.
@ -879,9 +879,9 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel',
* - binding the view into the model, which other directives such as `input`, `textarea` or `select`
* require,
* - providing validation behavior (i.e. required, number, email, url),
* - keeping state of the widget (valid/invalid, dirty/pristine, validation errors),
* - keeping state of the control (valid/invalid, dirty/pristine, validation errors),
* - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`),
* - register the widget with parent {@link angular.module.ng.$compileProvider.directive.form form}.
* - register the control with parent {@link angular.module.ng.$compileProvider.directive.form form}.
*
* For basic examples, how to use `ng-model`, see:
*

View file

@ -8,8 +8,6 @@
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
* by angular. Use `ng-non-bindable` to make angular ignore a chunk of HTML.
*
* Note: `ng-non-bindable` looks like a directive, but is actually an attribute widget.
*
* @element ANY
*
* @example

View file

@ -7,7 +7,7 @@
*
* @description
* # Overview
* ng-pluralize is a widget that displays messages according to en-US localization rules.
* ng-pluralize is a directive that displays messages according to en-US localization rules.
* These rules are bundled with angular.js and the rules can be overridden
* (see {@link guide/dev_guide.i18n Angular i18n} dev guide). You configure ng-pluralize by
* specifying the mappings between

View file

@ -5,7 +5,7 @@
* @name angular.module.ng.$compileProvider.directive.ng-repeat
*
* @description
* The `ng-repeat` widget instantiates a template once per item from a collection. Each template
* The `ng-repeat` directive instantiates a template once per item from a collection. Each template
* instance gets its own scope, where the given loop variable is set to the current collection item,
* and `$index` is set to the item index or key.
*
@ -17,7 +17,6 @@
* * `'middle'`
* * `'last'`
*
* Note: Although `ng-repeat` looks like a directive, it is actually an attribute widget.
*
* @element ANY
* @scope

View file

@ -34,7 +34,7 @@
* * binding to a value not in list confuses most browsers.
*
* @param {string} name assignable expression to data-bind to.
* @param {string=} required The widget is considered valid only if value is entered.
* @param {string=} required The control is considered valid only if value is entered.
* @param {comprehension_expression=} ng-options in one of the following forms:
*
* * for array data sources:

View file

@ -116,12 +116,6 @@
* </pre>
*
*
* Compiler Methods For Widgets and Directives:
*
* The following methods are available for use when you write your own widgets, directives,
* and markup.
*
*
* For information on how the compiler works, see the
* {@link guide/dev_guide.compiler Angular HTML Compiler} section of the Developer Guide.
*/
@ -427,7 +421,7 @@ function $CompileProvider($provide) {
/**
* Once the directives have been collected their compile functions is executed. This method
* is responsible for inlining widget templates as well as terminating the application
* is responsible for inlining directive templates as well as terminating the application
* of the directives if the terminal directive has been reached..
*
* @param {Array} directives Array of collected directives to execute their compile function.

View file

@ -28,7 +28,7 @@ function $RouteProvider(){
* created scope.
* - `template` `{string=}` path to an html template that should be used by
* {@link angular.module.ng.$compileProvider.directive.ng-view ng-view} or
* {@link angular.module.ng.$compileProvider.directive.ng-include ng-include} widgets.
* {@link angular.module.ng.$compileProvider.directive.ng-include ng-include} directives.
* - `redirectTo` {(string|function())=} value to update
* {@link angular.module.ng.$location $location} path with and trigger route redirection.
*