保存服务呼叫后,Dailog弹出功能中断

时间:2019-06-13 10:11:18

标签: javascript angularjs

在$ http.post调用后尝试打开ngDialog时,对话框功能中断 以下是保存($ http.post)调用后打开弹出窗口的代码

  $scope.$parent.studio.saveBodData().then(function () {  //API call
    vm.openPreviewGenerateModal('results'); //Code to open Popup
   }); 

  function openPreviewGenerateModal(page) {
    vm.generateResultsPopupflag = true;
    vm.previewDialog = ngDialog.open({
        template: 'templates/bod/previewGenerateModal.tmpl.html',
        className: 'ngdialog-theme-default ngdialog-custom preview-Modal-wrapper',scope: $scope,
        data: {
            page: page
        },
        showClose: false,
        closeByEscape: false,
        closeByDocument: false
    });
}  

0 个答案:

没有答案