Skip to content

Commit 1b02177

Browse files
committed
made ui-modal restrict EAC for more freedom of use
1 parent b52de10 commit 1b02177

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/directives/modal/modal.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
21
angular.module('ui.directives')
32
.directive('uiModal', ['$timeout', function($timeout) {
43
return {
4+
restrict: 'EAC',
55
require: 'ngModel',
66
link: function(scope, elm, attrs, model) {
77
//helper so you don't have to type class="modal hide"
8-
elm.addClass('modal hide');
8+
elm.addClass('modal hide');
99
scope.$watch(attrs.ngModel, function(value) {
10-
elm.modal(value && 'show' || 'hide');
10+
elm.modal(value && 'show' || 'hide');
1111
});
1212
elm.on('show.ui', function() {
13-
$timeout(function() {
14-
model.$setViewValue(true);
15-
});
13+
$timeout(function() {
14+
model.$setViewValue(true);
15+
});
1616
});
1717
elm.on('hide.ui', function() {
1818
$timeout(function() {
19-
model.$setViewValue(false);
19+
model.$setViewValue(false);
2020
});
2121
});
2222
}
2323
};
24-
}]);
24+
}]);

0 commit comments

Comments
 (0)