From 06d0955074f79de553cc34fbf945045dc458e064 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 30 Mar 2012 12:07:19 -0700 Subject: feat(ngModel): update model on each key stroke (revert ngModelInstant) It turns out that listening only on "blur" event is not sufficient in many scenarios, especially when you use form validation you always had to use ngModelnstant e.g. if you want to disable a button based on valid/invalid form. The feedback we got from our apps as well as external apps is that the ngModelInstant should be the default. In the future we might provide alternative ways of suppressing updates on each key stroke, but it's not going to be the default behavior. Apps already using the ngModelInstant can safely remove it from their templates. Input fields without ngModelInstant directive will start propagating the input changes into the model on each key stroke. --- docs/content/guide/dev_guide.forms.ngdoc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'docs/content/guide/dev_guide.forms.ngdoc') diff --git a/docs/content/guide/dev_guide.forms.ngdoc b/docs/content/guide/dev_guide.forms.ngdoc index c643a613..0c3a7fc3 100644 --- a/docs/content/guide/dev_guide.forms.ngdoc +++ b/docs/content/guide/dev_guide.forms.ngdoc @@ -20,7 +20,7 @@ In addition it provides {@link api/angular.module.ng.$compileProvider.directive.
- Name:
+ Name:
E-mail:
Gender: male female
@@ -50,11 +50,7 @@ In addition it provides {@link api/angular.module.ng.$compileProvider.directive. -Note that: - - * the {@link api/angular.module.ng.$compileProvider.directive.ng-model-instant ng-model-instant} causes the `user.name` to be updated immediately. - - * `novalidate` is used to disable browser's native form validation. +Note that `novalidate` is used to disable browser's native form validation. @@ -76,7 +72,7 @@ This ensures that the user is not distracted with an error until after interacti
Name: -
+
E-mail:
Gender: male female
@@ -147,7 +143,7 @@ This allows us to extend the above example with these features: I agree:
+ required />
Please agree and sign.
-- cgit v1.2.3