Trying to capture the focus or click event of a user returning to a search field.
<form name="searchUser">
<input type="search" placeHolder="Username to find" ng-model="username" ng-focus="focusSet()">
<input type="submit" value="Search" ng-click="search(username)" />
</form>
When someone click on the text(search) field I want to start a timer. The timer works for the initial page refresh but I cant get it to work for ng-focus or ng-click. So I degenerated to a simple focusSet function that just writes a line to the console. But it never writes the line on focus. Also tried this with click.
Why does angular not respond to the focus event?
var focusSet = function(){
$log.info("Got Focus");
$scope.focusSet = "now you see me";
};
here is my plunker if you want to see the whole thing http://plnkr.co/edit/zmWVWJrigRYkQk5jS5HU?p=preview