aboutsummaryrefslogtreecommitdiffstats
path: root/src/directive/form.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/directive/form.js')
-rw-r--r--src/directive/form.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/directive/form.js b/src/directive/form.js
index e3b937da..84352902 100644
--- a/src/directive/form.js
+++ b/src/directive/form.js
@@ -113,11 +113,11 @@ function FormController($scope, name) {
*
* If `name` attribute is specified, the controller is published to the scope as well.
*
- * # Alias: `ng:form`
+ * # Alias: `ng-form`
*
* In angular forms can be nested. This means that the outer form is valid when all of the child
* forms are valid as well. However browsers do not allow nesting of `<form>` elements, for this
- * reason angular provides `<ng:form>` alias which behaves identical to `<form>` but allows
+ * reason angular provides `<ng-form>` alias which behaves identical to `<form>` but allows
* element nesting.
*
*
@@ -141,19 +141,19 @@ function FormController($scope, name) {
* You can use one of the following two ways to specify what javascript method should be called when
* a form is submitted:
*
- * - ng:submit on the form element (add link to ng:submit)
- * - ng:click on the first button or input field of type submit (input[type=submit])
+ * - ng-submit on the form element (add link to ng-submit)
+ * - ng-click on the first button or input field of type submit (input[type=submit])
*
- * To prevent double execution of the handler, use only one of ng:submit or ng:click. This is
+ * To prevent double execution of the handler, use only one of ng-submit or ng-click. This is
* because of the following form submission rules coming from the html spec:
*
* - If a form has only one input field then hitting enter in this field triggers form submit
- * (`ng:submit`)
+ * (`ng-submit`)
* - if a form has has 2+ input fields and no buttons or input[type=submit] then hitting enter
* doesn't trigger submit
* - if a form has one or more input fields and one or more buttons or input[type=submit] then
* hitting enter in any of the input fields will trigger the click handler on the *first* button or
- * input[type=submit] (`ng:click`) *and* a submit handler on the enclosing form (`ng:submit`)
+ * input[type=submit] (`ng-click`) *and* a submit handler on the enclosing form (`ng-submit`)
*
* @param {string=} name Name of the form. If specified, the form controller will be published into
* related scope, under this name.
@@ -166,9 +166,9 @@ function FormController($scope, name) {
$scope.text = 'guest';
}
</script>
- <form name="myForm" ng:controller="Ctrl">
- text: <input type="text" name="input" ng:model="text" required>
- <span class="error" ng:show="myForm.input.error.REQUIRED">Required!</span>
+ <form name="myForm" ng-controller="Ctrl">
+ text: <input type="text" name="input" ng-model="text" required>
+ <span class="error" ng-show="myForm.input.error.REQUIRED">Required!</span>
<tt>text = {{text}}</tt><br/>
<tt>myForm.input.valid = {{myForm.input.valid}}</tt><br/>
<tt>myForm.input.error = {{myForm.input.error}}</tt><br/>