0
이 PLUNK에서 저는 각도 UI 모달과 버튼을 닫습니다. 모달 인스턴스에 close
메서드가 없으므로 단추가 작동하지 않습니다.각도 UI 모달에서 닫기 버튼이 작동하지 않습니다.
rendered
문을 제거하면 단추가 작동합니다. rendered
과 함께 작동하지 않는 이유는 무엇입니까?
이 작동하지 않습니다
var app = angular.module('app', ['ui.bootstrap']);
app.controller('myCtl', function($scope,$uibModal) {
$scope.openModal = function() {
$scope.modalInstance = $uibModal.open({
templateUrl: 'myModalContent.html',
scope: $scope
}).rendered.then(function() {
alert("modal rendered")
});
};
$scope.close = function() {
$scope.modalInstance.close();
};
})
이합니까 일 (PLUNK 참조)
var app = angular.module('app', ['ui.bootstrap']);
app.controller('myCtl', function($scope,$uibModal) {
$scope.openModal = function() {
$scope.modalInstance = $uibModal.open({
templateUrl: 'myModalContent.html',
scope: $scope
});
};
$scope.close = function() {
$scope.modalInstance.close();
};
})