--
You received this message because you are subscribed to the Google Groups "angular" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
/i
> > > > angular+unsubscribe@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/angular?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "angular" group.
> > To post to this group, send email to ang...@googlegroups.com.
> > To unsubscribe from this group, send email to
--
You received this message because you are subscribed to the Google Groups "angular" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.
Regards,
Witold Szczerba
>>> > > > > angular+u...@googlegroups.com.
>>> > > > > For more options, visit this group at
>>> > > > >http://groups.google.com/group/angular?hl=en.
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> > > Groups
>>> > > "angular" group.
>>> > > To post to this group, send email to ang...@googlegroups.com.
>>> > > To unsubscribe from this group, send email to
>>> > > angular+u...@googlegroups.com.
>>> > > For more options, visit this group at
>>> > >http://groups.google.com/group/angular?hl=en.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "angular" group.
>>> To post to this group, send email to ang...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> angular+u...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/angular?hl=en.
>>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/angular/-/dTpHg7LiImsJ.
>
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to
> angular+u...@googlegroups.com.
Without loosing focus, the submitted data is incorrect. Of course I
can add 'ng-model-instant' but binding on blur was not introduced just
so we would have to disable it.
Regards,
Witold Szczerba
I just had to add an [ng-model-instant] to username, password input
fields that are [required] because I was using [ng:disabled] on a
"Login" button based upon whether the fields were blank or not.
-- Sean
Yes. The case I mentioned where I have ng:disabled="{{disableLogin()}}"
and the disableLogin() function is dependent upon the model.
Maybe that's just a case where you have to us ng-model-instant, but it
seems like a pretty common case. Maybe the presence of ng:disabled
attributes within the form would automatically set model-instant?
-- Sean
I suppose for mobile you could use lazy/non-instant and then, using the
same setting turn off the test that visibly disables the login (submit)
button (in my username/password/login scenario or similar use cases) If
you have a dynamically updated submit button and required fields you
have to check on every character (or with a slight delay) to enable the
button, so maybe the instant validate feature has to turn off when
model-instant isn't active. That might be the right tradeoff.
-- Sean
You can see the same issue in this fiddle that Misko just posted:
http://jsfiddle.net/7HcFZ/
Click on the author input, then tab to the title field and type
something but don't leave the field. It's hard to figure out what's
going on in the form because the create button is disabled.
-- Sean
It sounds right to me. It also might be nice to drive it from a
variable. So one could do something like this:
<form name="loginForm" ng-model-instant={{!mobile}}>
<input type="text" name="username" ng:model="username" required>
<input type="password" name="password" ng:model="password" required>
<button type="submit" ng:disabled="{{disableLogin() && !mobile}}"
ng:click="login(username,password)">Log In</button>
</form>
-- Sean
Having ng-model-instant on form is interesting idea.
select, checkbox, radio have all click/change event - that's a different story, that happens only once, ng-model-instant / lazy does not make any sense there...
You can't simply remove it. You can add a parser (through directive),
that would check the view and add the spaces back :-D
I don't know, we might remove the trimming or allow configuring directives...
V.
2012/3/28 Vitaly <chernov...@gmail.com>:
V.
2012/3/29 Vojta Jína <vojta...@gmail.com>:
Sorry - by checking the view I meant the value in input.