AngularJS directive for autofocusing HTML elements. When element with the directive is added to DOM, it will automatically get the focus.
npm install --save vi-angular-autofocus
or
bower install vi-angular-autofocus
or
yarn add vi-angular-autofocus
Register the module into your main app module
angular.module('myApp', ['vivify-ideas.angular-autofocus']);
In the template, use the vi-autofocus
directive:
<input name="name" type="text" vi-autofocus/>
LICENCE MIT