I have the following input box with ng-options :
<input ng-model="name" ng-model-options="{ updateOn: 'blur'}"
ng-change="addNewDpt()" type="text">
$scope.addNewDpt = function(){
// code
}
If I make some entry in the text box and click the mouse somewhere outside the input text box then function addNewDpt is getting executed and also the model name is getting update properly, which is fine. Now I want the same to happen, if I click enter or tab keys in the text box. How can I achieve it?
Hi Mn,
In my sample, the tab key worked ‘out of the box’. However, I added an form element to make the enter work. That makes sense, because without a form, in a input enter it is just a ‘null’ operator.
Does this make sense to you?
Regards
Sander
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/aB_vzogjKSY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.