frontend: add autofocus directive
This commit is contained in:
parent
9d4c048f0e
commit
5b2dc909e2
@ -7,6 +7,18 @@ String.prototype.capitalize = function() {
|
||||
);
|
||||
}
|
||||
|
||||
angular.module("FICApp")
|
||||
.directive('autofocus', ['$timeout', function($timeout) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link : function($scope, $element) {
|
||||
$timeout(function() {
|
||||
$element[0].focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
}]);
|
||||
|
||||
angular.module("FICApp")
|
||||
.filter("capitalize", function() {
|
||||
return function(input) {
|
||||
|
Loading…
Reference in New Issue
Block a user