mirror of https://github.com/portainer/portainer
15 lines
282 B
JavaScript
15 lines
282 B
JavaScript
|
angular
|
||
|
.module('portainer')
|
||
|
.directive('autoFocus', ['$timeout', function porAutoFocus($timeout) {
|
||
|
var directive = {
|
||
|
restrict: 'A',
|
||
|
link: function($scope, $element) {
|
||
|
$timeout(function() {
|
||
|
$element[0].focus();
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
return directive;
|
||
|
}]);
|