.directive('focusMe', function($timeout) {
return {
link: function(scope, element, attrs) {
$timeout(function() {
element[0].focus();
}, 150);
}
};
})
return {
link: function(scope, element, attrs) {
$timeout(function() {
element[0].focus();
}, 150);
}
};
})
<label class="item-input-wrapper" focus-me>
<input type="search" placeholder="Search">
<button class="button button-icon" ng-click="search()" style="color:black">
<i class="icon ion-ios-search placeholder-icon"></i>
</button>
</label>
0 comments:
Post a Comment