Files
dss.web/client/app/directives/misc/focus.js
Fergal Moran d2c529bafe Screw you git!
2015-12-01 19:50:20 +00:00

12 lines
370 B
JavaScript
Executable File

angular.module('dssWebApp')
.directive('showFocus', function ($timeout) {
return function(scope, element, attrs) {
scope.$watch(attrs.showFocus,
function (newValue) {
$timeout(function() {
newValue && element.focus();
});
},true);
};
});