All,
Im validating the text box. validations - allow only 12 digits number and
not a character.
So,
<input type="search" class="form-control" id="search" name="search"
ng-model="model.sn" ng-minlength="12" ng-maxlength="12"
ng-pattern="/^\d{12}$/" ng-keypress="form.$valid && myFunct($event)"
popover="{{ui.popoverText}}"
popover-trigger="{{{true:'keypress',false:'never'}[form.search.$valid]}}"
popover-placement="bottom">
Using ng-keypress directive, my app works.But there is a problem in that
angular not listening the event from third party jQuery (Bootstrap.js). Im
getting popover message for every key press, once the form is valid.
here is my controller function,
$scope.myFunct = function(ev) {
alert('apply....');
if (ev.which == 13)
$scope.ui.popoverText = " this number is invalid ";
}
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.