In an input I have a method that selects the contents of the field when clicking on it.
<input ng-click="selecionaTudo($event)">
The function is this:
$scope.selecionaTudo= function($event){
$event.target.select();
}
It works perfectly, but I want to use it in ng-focus, and in that event it does not work:
<input ng-focus="selecionaTudo($event)">
Can anyone tell me why? What alternatives do I have?