X Tutup
Skip to content

Commit afe617a

Browse files
committed
docs(*): renaming incorrect widget references to control or directive
1 parent f59e4b1 commit afe617a

File tree

8 files changed

+31
-38
lines changed

8 files changed

+31
-38
lines changed

src/directive/form.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@
77
*
88
* @property {boolean} $pristine True if user has not interacted with the form yet.
99
* @property {boolean} $dirty True if user has already interacted with the form.
10-
* @property {boolean} $valid True if all of the containg widgets are valid.
11-
* @property {boolean} $invalid True if at least one containing widget is invalid.
10+
* @property {boolean} $valid True if all of the containg forms and controls are valid.
11+
* @property {boolean} $invalid True if at least one containing control or form is invalid.
1212
*
13-
* @property {Object} $error Is an object hash, containing references to all invalid widgets, where
13+
* @property {Object} $error Is an object hash, containing references to all invalid controls or
14+
* forms, where:
1415
*
15-
* - keys are error ids (such as `REQUIRED`, `URL` or `EMAIL`),
16-
* - values are arrays of widgets that are invalid with given error.
16+
* - keys are validation tokens (error names) — such as `REQUIRED`, `URL` or `EMAIL`),
17+
* - values are arrays of controls or forms that are invalid with given error.
1718
*
1819
* @description
19-
* `FormController` keeps track of all its widgets as well as state of them form, such as being valid/invalid or dirty/pristine.
20+
* `FormController` keeps track of all its controls and nested forms as well as state of them,
21+
* such as being valid/invalid or dirty/pristine.
2022
*
2123
* Each {@link angular.module.ng.$compileProvider.directive.form form} directive creates an instance
2224
* of `FormController`.

src/directive/input.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var inputType = {
1414
* Standard HTML text input with angular data binding.
1515
*
1616
* @param {string} ng-model Assignable angular expression to data-bind to.
17-
* @param {string=} name Property name of the form under which the widgets is published.
17+
* @param {string=} name Property name of the form under which the control is published.
1818
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
1919
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
2020
* minlength.
@@ -81,7 +81,7 @@ var inputType = {
8181
* error if not a valid number.
8282
*
8383
* @param {string} ng-model Assignable angular expression to data-bind to.
84-
* @param {string=} name Property name of the form under which the widgets is published.
84+
* @param {string=} name Property name of the form under which the control is published.
8585
* @param {string=} min Sets the `MIN` validation error key if the value entered is less then `min`.
8686
* @param {string=} max Sets the `MAX` validation error key if the value entered is greater then `min`.
8787
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
@@ -149,7 +149,7 @@ var inputType = {
149149
* valid URL.
150150
*
151151
* @param {string} ng-model Assignable angular expression to data-bind to.
152-
* @param {string=} name Property name of the form under which the widgets is published.
152+
* @param {string=} name Property name of the form under which the control is published.
153153
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
154154
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
155155
* minlength.
@@ -214,7 +214,7 @@ var inputType = {
214214
* address.
215215
*
216216
* @param {string} ng-model Assignable angular expression to data-bind to.
217-
* @param {string=} name Property name of the form under which the widgets is published.
217+
* @param {string=} name Property name of the form under which the control is published.
218218
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
219219
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
220220
* minlength.
@@ -277,7 +277,7 @@ var inputType = {
277277
*
278278
* @param {string} ng-model Assignable angular expression to data-bind to.
279279
* @param {string} value The value to which the expression should be set when selected.
280-
* @param {string=} name Property name of the form under which the widgets is published.
280+
* @param {string=} name Property name of the form under which the control is published.
281281
* @param {string=} ng-change Angular expression to be executed when input changes due to user
282282
* interaction with the input element.
283283
*
@@ -317,7 +317,7 @@ var inputType = {
317317
* HTML checkbox.
318318
*
319319
* @param {string} ng-model Assignable angular expression to data-bind to.
320-
* @param {string=} name Property name of the form under which the widgets is published.
320+
* @param {string=} name Property name of the form under which the control is published.
321321
* @param {string=} ng-true-value The value to which the expression should be set when selected.
322322
* @param {string=} ng-false-value The value to which the expression should be set when not selected.
323323
* @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) {
594594
* @name angular.module.ng.$compileProvider.directive.textarea
595595
*
596596
* @description
597-
* HTML textarea element widget with angular data-binding. The data-binding and validation
597+
* HTML textarea element control with angular data-binding. The data-binding and validation
598598
* properties of this element are exactly the same as those of the
599599
* {@link angular.module.ng.$compileProvider.directive.input input element}.
600600
*
601601
* @param {string} ng-model Assignable angular expression to data-bind to.
602-
* @param {string=} name Property name of the form under which the widgets is published.
602+
* @param {string=} name Property name of the form under which the control is published.
603603
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
604604
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
605605
* minlength.
@@ -619,11 +619,11 @@ function checkboxInputType(scope, element, attr, ctrl) {
619619
* @restrict E
620620
*
621621
* @description
622-
* HTML input element widget with angular data-binding. Input widget follows HTML5 input types
622+
* HTML input element control with angular data-binding. Input control follows HTML5 input types
623623
* and polyfills the HTML5 validation behavior for older browsers.
624624
*
625625
* @param {string} ng-model Assignable angular expression to data-bind to.
626-
* @param {string=} name Property name of the form under which the widgets is published.
626+
* @param {string=} name Property name of the form under which the control is published.
627627
* @param {string=} required Sets `REQUIRED` validation error key if the value is not entered.
628628
* @param {number=} ng-minlength Sets `MINLENGTH` validation error key if the value is shorter than
629629
* minlength.
@@ -725,19 +725,19 @@ var inputDirective = [function() {
725725
* @name angular.module.ng.$compileProvider.directive.ng-model.NgModelController
726726
*
727727
* @property {string} viewValue Actual string value in the view.
728-
* @property {*} modelValue The value in the model, that the widget is bound to.
729-
* @property {Array.<Function>} parsers Whenever the widget reads value from the DOM, it executes
728+
* @property {*} modelValue The value in the model, that the control is bound to.
729+
* @property {Array.<Function>} parsers Whenever the control reads value from the DOM, it executes
730730
* all of these functions to sanitize / convert the value as well as validate.
731731
*
732732
* @property {Array.<Function>} formatters Whenever the model value changes, it executes all of
733733
* these functions to convert the value as well as validate.
734734
*
735735
* @property {Object} error An bject hash with all errors as keys.
736736
*
737-
* @property {boolean} pristine True if user has not interacted with the widget yet.
738-
* @property {boolean} dirty True if user has already interacted with the widget.
737+
* @property {boolean} pristine True if user has not interacted with the control yet.
738+
* @property {boolean} dirty True if user has already interacted with the control.
739739
* @property {boolean} valid True if there is no error.
740-
* @property {boolean} invalid True if at least one error on the widget.
740+
* @property {boolean} invalid True if at least one error on the control.
741741
*
742742
* @description
743743
*
@@ -764,7 +764,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel',
764764
* @methodOf angular.module.ng.$compileProvider.directive.ng-model.NgModelController
765765
*
766766
* @description
767-
* Change the validity state, and notifies the form when the widget changes validity. (i.e. it
767+
* Change the validity state, and notifies the form when the control changes validity. (i.e. it
768768
* does not notify form if given validator is already marked as invalid).
769769
*
770770
* This method should be called by validators - i.e. the parser or formatter functions.
@@ -879,9 +879,9 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel',
879879
* - binding the view into the model, which other directives such as `input`, `textarea` or `select`
880880
* require,
881881
* - providing validation behavior (i.e. required, number, email, url),
882-
* - keeping state of the widget (valid/invalid, dirty/pristine, validation errors),
882+
* - keeping state of the control (valid/invalid, dirty/pristine, validation errors),
883883
* - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`),
884-
* - register the widget with parent {@link angular.module.ng.$compileProvider.directive.form form}.
884+
* - register the control with parent {@link angular.module.ng.$compileProvider.directive.form form}.
885885
*
886886
* For basic examples, how to use `ng-model`, see:
887887
*

src/directive/ngNonBindable.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
99
* by angular. Use `ng-non-bindable` to make angular ignore a chunk of HTML.
1010
*
11-
* Note: `ng-non-bindable` looks like a directive, but is actually an attribute widget.
12-
*
1311
* @element ANY
1412
*
1513
* @example

src/directive/ngPluralize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @description
99
* # Overview
10-
* ng-pluralize is a widget that displays messages according to en-US localization rules.
10+
* ng-pluralize is a directive that displays messages according to en-US localization rules.
1111
* These rules are bundled with angular.js and the rules can be overridden
1212
* (see {@link guide/dev_guide.i18n Angular i18n} dev guide). You configure ng-pluralize by
1313
* specifying the mappings between

src/directive/ngRepeat.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @name angular.module.ng.$compileProvider.directive.ng-repeat
66
*
77
* @description
8-
* The `ng-repeat` widget instantiates a template once per item from a collection. Each template
8+
* The `ng-repeat` directive instantiates a template once per item from a collection. Each template
99
* instance gets its own scope, where the given loop variable is set to the current collection item,
1010
* and `$index` is set to the item index or key.
1111
*
@@ -17,7 +17,6 @@
1717
* * `'middle'`
1818
* * `'last'`
1919
*
20-
* Note: Although `ng-repeat` looks like a directive, it is actually an attribute widget.
2120
*
2221
* @element ANY
2322
* @scope

src/directive/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* * binding to a value not in list confuses most browsers.
3535
*
3636
* @param {string} name assignable expression to data-bind to.
37-
* @param {string=} required The widget is considered valid only if value is entered.
37+
* @param {string=} required The control is considered valid only if value is entered.
3838
* @param {comprehension_expression=} ng-options in one of the following forms:
3939
*
4040
* * for array data sources:

src/service/compiler.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,6 @@
116116
* </pre>
117117
*
118118
*
119-
* Compiler Methods For Widgets and Directives:
120-
*
121-
* The following methods are available for use when you write your own widgets, directives,
122-
* and markup.
123-
*
124-
*
125119
* For information on how the compiler works, see the
126120
* {@link guide/dev_guide.compiler Angular HTML Compiler} section of the Developer Guide.
127121
*/
@@ -427,7 +421,7 @@ function $CompileProvider($provide) {
427421

428422
/**
429423
* Once the directives have been collected their compile functions is executed. This method
430-
* is responsible for inlining widget templates as well as terminating the application
424+
* is responsible for inlining directive templates as well as terminating the application
431425
* of the directives if the terminal directive has been reached..
432426
*
433427
* @param {Array} directives Array of collected directives to execute their compile function.

src/service/route.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function $RouteProvider(){
2828
* created scope.
2929
* - `template` – `{string=}` – path to an html template that should be used by
3030
* {@link angular.module.ng.$compileProvider.directive.ng-view ng-view} or
31-
* {@link angular.module.ng.$compileProvider.directive.ng-include ng-include} widgets.
31+
* {@link angular.module.ng.$compileProvider.directive.ng-include ng-include} directives.
3232
* - `redirectTo` – {(string|function())=} – value to update
3333
* {@link angular.module.ng.$location $location} path with and trigger route redirection.
3434
*

0 commit comments

Comments
 (0)
X Tutup