aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Minar2011-10-12 11:49:42 -0700
committerIgor Minar2011-10-12 11:49:42 -0700
commita4b45397e006c86000af55e389084418f88b65c3 (patch)
treee27776d7e1f9fa7cf5c6133842189b11c3cd742f
parentde4e06ed7354020d0edcd0314174fbaf15164801 (diff)
downloadangular.js-a4b45397e006c86000af55e389084418f88b65c3.tar.bz2
docs(forms): add ng:change docs and other fixes
-rw-r--r--docs/content/cookbook/form.ngdoc2
-rw-r--r--docs/content/cookbook/helloworld.ngdoc2
-rw-r--r--src/widget/input.js22
3 files changed, 21 insertions, 5 deletions
diff --git a/docs/content/cookbook/form.ngdoc b/docs/content/cookbook/form.ngdoc
index 874db792..41d2be26 100644
--- a/docs/content/cookbook/form.ngdoc
+++ b/docs/content/cookbook/form.ngdoc
@@ -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.
diff --git a/docs/content/cookbook/helloworld.ngdoc b/docs/content/cookbook/helloworld.ngdoc
index 67d78bbe..96ce4c25 100644
--- a/docs/content/cookbook/helloworld.ngdoc
+++ b/docs/content/cookbook/helloworld.ngdoc
@@ -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.
diff --git a/src/widget/input.js b/src/widget/input.js
index 18d1ae12..a4f04e57 100644
--- a/src/widget/input.js
+++ b/src/widget/input.js
@@ -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>