javascript - Select input shown with ng-show -
javascript - Select input shown with ng-show -
i'd set focus on input after it's shown ng-show. however, requires jquery phone call made after $digest cycle. know how run code after item shown, without resorting settimeout(), or such thing? here's illustration plunk of issue: http://plnkr.co/edit/synsip?p=preview
you can write simple directive , dont need jquery :
yourapp.directive('focusme',function(){ homecoming function(scope,elem,att){ elem.focus(); } });
and can utilize :
<input type="text" focusme>
javascript jquery angularjs ng-repeat ng-show
Comments
Post a Comment