mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-22 09:30:28 +00:00
docs(forms): add ng:change docs and other fixes
This commit is contained in:
parent
de4e06ed73
commit
a4b45397e0
3 changed files with 21 additions and 5 deletions
|
|
@ -96,7 +96,7 @@ available in
|
|||
the {@link api/angular.scope scope} with the initial data.
|
||||
* For debugging purposes we have included a debug view of the model to better understand what
|
||||
is going on.
|
||||
* The {@link api/angular.widget.HTML input widgets} simply refer to the model and are auto bound.
|
||||
* The {@link api/angular.widget.input input widgets} simply refer to the model and are data-bound.
|
||||
* The inputs {@link guide/dev_guide.forms validate}. (Try leaving them blank or entering non digits
|
||||
in the zip field)
|
||||
* In your application you can simply read from or write to the model and the form will be updated.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
Take a look through the source and note:
|
||||
|
||||
* The script tag that {@link guide/dev_guide.bootstrap bootstraps} the angular environment.
|
||||
* The text {@link api/angular.widget.HTML input widget} which is bound to the greeting name text.
|
||||
* The text {@link api/angular.widget.input input widget} which is bound to the greeting name text.
|
||||
* No need for listener registration and event firing on change events.
|
||||
* The implicit presence of the `name` variable which is in the root {@link api/angular.scope scope}.
|
||||
* The double curly brace `{{markup}}`, which binds the name variable to the greeting text.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ var INTEGER_REGEXP = /^\s*(\-|\+)?\d+\s*$/;
|
|||
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
|
||||
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
|
||||
* patterns defined as scope expressions.
|
||||
* @param {string=} ng:change Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
@ -150,6 +152,8 @@ angularInputType('email', function() {
|
|||
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
|
||||
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
|
||||
* patterns defined as scope expressions.
|
||||
* @param {string=} ng:change Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
@ -217,6 +221,8 @@ angularInputType('url', function() {
|
|||
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
|
||||
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
|
||||
* patterns defined as scope expressions.
|
||||
* @param {string=} ng:change Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
@ -290,6 +296,8 @@ angularInputType('list', function() {
|
|||
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
|
||||
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
|
||||
* patterns defined as scope expressions.
|
||||
* @param {string=} ng:change Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
@ -354,6 +362,8 @@ angularInputType('number', numericRegexpInputType(NUMBER_REGEXP, 'NUMBER'));
|
|||
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
|
||||
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
|
||||
* patterns defined as scope expressions.
|
||||
* @param {string=} ng:change Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
@ -413,6 +423,8 @@ angularInputType('integer', numericRegexpInputType(INTEGER_REGEXP, 'INTEGER'));
|
|||
* @param {string=} name Property name of the form under which the widgets is published.
|
||||
* @param {string=} true-value The value to which the expression should be set when selected.
|
||||
* @param {string=} 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
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
@ -480,11 +492,13 @@ angularInputType('checkbox', function(inputElement) {
|
|||
* @name angular.inputType.radio
|
||||
*
|
||||
* @description
|
||||
* HTML radio.
|
||||
* HTML radio button.
|
||||
*
|
||||
* @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=} ng:change Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
@ -585,8 +599,8 @@ var HTML5_INPUTS_TYPES = makeMap(
|
|||
* HTML input element widget with angular data-binding. Input widget follows HTML5 input types
|
||||
* and polyfills the HTML5 validation behavior for older browsers.
|
||||
*
|
||||
* The {@link angular.inputType custom angular.inputType}s provides a short hand for declaring new
|
||||
* inputs. This is a shart hand for text-box based inputs, and there is no need to go through the
|
||||
* The {@link angular.inputType custom angular.inputType}s provide a shorthand for declaring new
|
||||
* inputs. This is a sharthand for text-box based inputs, and there is no need to go through the
|
||||
* full {@link angular.service.$formFactory $formFactory} widget lifecycle.
|
||||
*
|
||||
*
|
||||
|
|
@ -599,6 +613,8 @@ var HTML5_INPUTS_TYPES = makeMap(
|
|||
* @param {string=} ng:pattern Sets `PATTERN` validation error key if the value does not match the
|
||||
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
|
||||
* patterns defined as scope expressions.
|
||||
* @param {string=} ng:change Angular expression to be executed when input changes due to user
|
||||
* interaction with the input element.
|
||||
*
|
||||
* @example
|
||||
<doc:example>
|
||||
|
|
|
|||
Loading…
Reference in a new issue