다운로드 버튼을 클릭 할 때 zip 파일이 다운로드되면서 다운로드가 UI 레이어에서 이루어 지지만 url은 API 호출 (HANA)이고 동일한 페이지에서 다운로드됩니다. 이제 데이터가 없으므로 zip 파일은 매우 짧은 시간 내에 다운로드되지만 제작 시나리오에서는 zip 파일을 다운로드하는 데 약간의 시간이 걸립니다. 이 시나리오에서는 사용자가 혼란스러워하지 않도록 "잠시 기다려주십시오 ... 진행 중입니다."와 같은 팝업이 필요합니다. 난 내가 windows.location.assign()
을 시도했지만 내가 버튼을다운로드 버튼에 팝업을 작성하는 방법
을 확인 일부 텍스트를 표시하거나 취소 팝업이 필요합니다 이것이 나의이 .html 코드
<button class="btn btn-primary" style="margin-right:10px;" ng-click="downloadData()">Download</button>
내의 .js 코드 AngularJS와
을 사용하고 있습니다
$scope.downloadData = function(){
try{
waitingDialog.show('Please wait!!!',{dialogSize: 'sm'});
window.location.assign(Config.endpoints.getDownloadPreviewData.url);
waitingDialog.hide();
}
catch(err){
$scope.showAlert('Some problem occured during the download, kindly try after some time', $scope.closeAlert);
}
}