0
다음과 같은 컨트롤러가 있습니다.이 컨트롤러로 라우팅하면 단추가없는 "대기"모달 팝업이 표시됩니다. 팝업이 켜져있는 동안 데이터를 반환하는 http 호출을 수행합니다. 어떻게 든이 시점에서 팝업을 닫고 싶습니다. 버튼이 없습니다. 나는 성공하지 못한 채 다양한 시도를 해왔다. 내 실험은 나에게 이러한이없는 오류 옵션 주었다
$scope.popup.close('a');
$uibModalStack.dismissAll();
불행하게도 그들은 작동하지 않습니다를 팝업은에로 남아있다. 도움을 많이 주셔서 감사합니다. 여기가 컨트롤러에있는 것입니다 : 사람들을위한
app.controller('PreviewCtrl', function($scope, $rootScope, $log, $location, $injector, $uibModal, $uibModalStack, cropService) {
var service = $injector.get('previewImageService');
$scope.crop = service.getProperty();
$log.info("PreviewCtrl --ln 1353 crop:", $scope.crop);
if($scope.crop == null){
$location.path("/edit");
}
var prefix = '${binding.variables.awsCropFolder}'+"/"+$scope.crop.name+"/"+$rootScope.imgName;
$scope.srcPreview = null;
$scope.popup = $uibModal.open({
animation: true,
templateUrl: 'progress.html',
ariaDescribedBy: 'modal-body',
size: "sm"
});//backdrop: "static",
$scope.getImage = function() {
var promise = cropService.getCrop(prefix);
promise.then(
function(payload) {
//console.log("payload:", payload)
$scope.srcPreview = payload.data.src == "" ? null:payload.data.src;
},
function(errorPayload) {
$log.error('Promise failure', errorPayload);
}
);
console.log("POPUP", $scope.popup);
$scope.popup.close('a');
$uibModalStack.dismissAll();
};
$scope.getImage();
$scope.returnToEdit = function() {
$location.path("/edit");
};
});