From 23cd40a8ec18d1dd947c8cd5d0fb0be68c1bac9c Mon Sep 17 00:00:00 2001 From: Jonathan Card Date: Sun, 16 Dec 2012 14:32:19 -0700 Subject: docs(form): minor form doc and example fixes Form documentation fixes: - Fix broken form example in docs - A few small other corrections in form docs. --- src/ng/directive/form.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ng/directive/form.js b/src/ng/directive/form.js index 4f06f093..aff0ea48 100644 --- a/src/ng/directive/form.js +++ b/src/ng/directive/form.js @@ -14,13 +14,13 @@ var nullFormCtrl = { * * @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 forms and controls are valid. + * @property {boolean} $valid True if all of the containing 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 controls or * forms, where: * - * - keys are validation tokens (error names) — such as `REQUIRED`, `URL` or `EMAIL`), + * - 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 @@ -133,7 +133,7 @@ function FormController(element, attrs) { * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a * sub-group of controls needs to be determined. * - * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into + * @param {string=} name|ngForm Name of the form. If specified, the form controller will be published into * related scope, under this name. * */ @@ -206,12 +206,12 @@ function FormController(element, attrs) {
userType: - Required!
+ Required!
userType = {{userType}}
myForm.input.$valid = {{myForm.input.$valid}}
myForm.input.$error = {{myForm.input.$error}}
myForm.$valid = {{myForm.$valid}}
- myForm.$error.REQUIRED = {{!!myForm.$error.REQUIRED}}
+ myForm.$error.required = {{!!myForm.$error.required}}
-- cgit v1.2.3