0
나는 HTML 요소에 포커스를 설정하는 AngularJs 지시문을 만들었습니다. 그러나 $ uibModal 요소에서 작동하지 않습니다
angular.module('ui.bootstrap.demo')
.directive('focus', ['$timeout', function ($timeout) {
return {
restrict: 'A',
link: function postLink(scope, element, attrs) {
scope.$watch(attrs.focus, function(value) {
if(value === true) {
$timeout(function() {
element[0].focus();
});
}
});
}
};
}]);
http://plnkr.co/edit/BrnFt1kYZN7VsIFRCt3S?p=preview
가 어떻게이 $ uibModal 내부 요소에 초점을 설정할 수 있습니까?
위대한 작품! 특히 대부분의 경우이 링크 기능에 액세스 할 수 없기 때문에 특히 그렇습니다. – Void