<input type='text' ng-focus='tryFunc()'> </input>
The function tryFunc()
is not called when the input box is focused.
I am including jQuery.min.js
in the file and it is before angular.min.js
jQuery is version v1.10.2 and Angular.js is v1.0.7.
What may be happening?
<input type='text' ng-focus='tryFunc()'> </input>
The function tryFunc()
is not called when the input box is focused.
I am including jQuery.min.js
in the file and it is before angular.min.js
jQuery is version v1.10.2 and Angular.js is v1.0.7.
What may be happening?
Share Improve this question asked Aug 31, 2013 at 14:19 Program_SauceProgram_Sauce 2832 gold badges7 silver badges14 bronze badges 1- For anyone else arriving here looking for a working example of ng-focus / ng-blur in 1.2.x: jsfiddle.net/b8zRG/1 – rdjs Commented Dec 18, 2013 at 15:37
2 Answers
Reset to default 13ngFocus is not available on Angular 1.0.7. It's available on Angular 1.2.
You can create your own ngFocus directive, it's quite simple, have a look here:
https://gist.github.com/eliotsykes/5394631
works with version 1.2.17 See demo
https://gist.github.com/anonymous/35636e7c020d50aeab18