salix/client/core/src/focus.js

14 lines
302 B
JavaScript
Raw Normal View History

import {module} from './module';
export function directive() {
return {
restrict: 'A',
link: function($scope, $element, $attrs) {
var input = $element[0];
input.focus();
input.select();
}
};
}
module.directive('vnFocus', directive);