mirror of
https://github.com/fergalmoran/dss.web.git
synced 2026-02-16 13:11:33 +00:00
12 lines
370 B
JavaScript
12 lines
370 B
JavaScript
angular.module('dssWebApp')
|
|
.directive('showFocus', function ($timeout) {
|
|
return function(scope, element, attrs) {
|
|
scope.$watch(attrs.showFocus,
|
|
function (newValue) {
|
|
$timeout(function() {
|
|
newValue && element.focus();
|
|
});
|
|
},true);
|
|
};
|
|
});
|