Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a4b4539

Browse files
committed
docs(forms): add ng:change docs and other fixes
1 parent de4e06e commit a4b4539

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

docs/content/cookbook/form.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ available in
9696
the {@link api/angular.scope scope} with the initial data.
9797
* For debugging purposes we have included a debug view of the model to better understand what
9898
is going on.
99-
* The {@link api/angular.widget.HTML input widgets} simply refer to the model and are auto bound.
99+
* The {@link api/angular.widget.input input widgets} simply refer to the model and are data-bound.
100100
* The inputs {@link guide/dev_guide.forms validate}. (Try leaving them blank or entering non digits
101101
in the zip field)
102102
* In your application you can simply read from or write to the model and the form will be updated.

docs/content/cookbook/helloworld.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
Take a look through the source and note:
3131

3232
* The script tag that {@link guide/dev_guide.bootstrap bootstraps} the angular environment.
33-
* The text {@link api/angular.widget.HTML input widget} which is bound to the greeting name text.
33+
* The text {@link api/angular.widget.input input widget} which is bound to the greeting name text.
3434
* No need for listener registration and event firing on change events.
3535
* The implicit presence of the `name` variable which is in the root {@link api/angular.scope scope}.
3636
* The double curly brace `{{markup}}`, which binds the name variable to the greeting text.

src/widget/input.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ var INTEGER_REGEXP = /^\s*(\-|\+)?\d+\s*$/;
2020
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
2121
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
2222
* patterns defined as scope expressions.
23+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
24+
* interaction with the input element.
2325
*
2426
* @example
2527
<doc:example>
@@ -150,6 +152,8 @@ angularInputType('email', function() {
150152
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
151153
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
152154
* patterns defined as scope expressions.
155+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
156+
* interaction with the input element.
153157
*
154158
* @example
155159
<doc:example>
@@ -217,6 +221,8 @@ angularInputType('url', function() {
217221
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
218222
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
219223
* patterns defined as scope expressions.
224+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
225+
* interaction with the input element.
220226
*
221227
* @example
222228
<doc:example>
@@ -290,6 +296,8 @@ angularInputType('list', function() {
290296
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
291297
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
292298
* patterns defined as scope expressions.
299+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
300+
* interaction with the input element.
293301
*
294302
* @example
295303
<doc:example>
@@ -354,6 +362,8 @@ angularInputType('number', numericRegexpInputType(NUMBER_REGEXP, 'NUMBER'));
354362
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
355363
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
356364
* patterns defined as scope expressions.
365+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
366+
* interaction with the input element.
357367
*
358368
* @example
359369
<doc:example>
@@ -413,6 +423,8 @@ angularInputType('integer', numericRegexpInputType(INTEGER_REGEXP, 'INTEGER'));
413423
* @param {string=} name Property name of the form under which the widgets is published.
414424
* @param {string=} true-value The value to which the expression should be set when selected.
415425
* @param {string=} false-value The value to which the expression should be set when not selected.
426+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
427+
* interaction with the input element.
416428
*
417429
* @example
418430
<doc:example>
@@ -480,11 +492,13 @@ angularInputType('checkbox', function(inputElement) {
480492
* @name angular.inputType.radio
481493
*
482494
* @description
483-
* HTML radio.
495+
* HTML radio button.
484496
*
485497
* @param {string} ng:model Assignable angular expression to data-bind to.
486498
* @param {string} value The value to which the expression should be set when selected.
487499
* @param {string=} name Property name of the form under which the widgets is published.
500+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
501+
* interaction with the input element.
488502
*
489503
* @example
490504
<doc:example>
@@ -585,8 +599,8 @@ var HTML5_INPUTS_TYPES = makeMap(
585599
* HTML input element widget with angular data-binding. Input widget follows HTML5 input types
586600
* and polyfills the HTML5 validation behavior for older browsers.
587601
*
588-
* The {@link angular.inputType custom angular.inputType}s provides a short hand for declaring new
589-
* inputs. This is a shart hand for text-box based inputs, and there is no need to go through the
602+
* The {@link angular.inputType custom angular.inputType}s provide a shorthand for declaring new
603+
* inputs. This is a sharthand for text-box based inputs, and there is no need to go through the
590604
* full {@link angular.service.$formFactory $formFactory} widget lifecycle.
591605
*
592606
*
@@ -599,6 +613,8 @@ var HTML5_INPUTS_TYPES = makeMap(
599613
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
600614
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
601615
* patterns defined as scope expressions.
616+
* @param {string=} ng:change Angular expression to be executed when input changes due to user
617+
* interaction with the input element.
602618
*
603619
* @example
604620
<doc:example>

0 commit comments

Comments
 (0)