Select Input Shown With Ng-show
I'd like to put the focus on an input after it's shown with ng-show. However, this requires a jquery call to be made after the $digest cycle. Does anyone know how to run code after
Solution 1:
You can write a simple directive , dont need jquery :
yourApp.directive('focusme',function(){
returnfunction(scope,elem,att){
elem.focus();
}
});
and You can use it like this :
<inputtype="text" focusme>
Post a Comment for "Select Input Shown With Ng-show"