javascript - Angular focus on input using ng-click -
this question has answer here:
- how set focus on input field? 31 answers
 - set element focus in angular way 6 answers
 
i attempting make input focused on when user clicks on element.
i have following angular bootstrap modal pop following content:
<div ng-hide="thedata.input">     <div ng-click="showtheinput()">click me</div> </div>  <div ng-show="thedata.input">     <input id="focus_me" type="text" required />    </div>   here controller code reason, can't input focus.
$scope.thedata = { input: false }  $scope.showtheinput = function() {     $scope.thedata.input = true;     $("#focus_me").focus(); }   could me out? know using jquery doesn't work. or guidance appreciated.
 
 
  
Comments
Post a Comment