Disable modal in jhipster/angular ui

喜夏-厌秋 提交于 2020-01-02 10:45:33

问题


I would like to disable modal dialogs in a jhipster generated application in favor of elements displayed in page.

See https://github.com/jhipster/generator-jhipster/issues/2693


回答1:


You should make it just like the "-detail" state right above. Make a block like

views: {
    'content@': {
        templateUrl: 'app/entities/smthn/smthn-dialog.html',
        controller: 'SmthnDialogController',
        controllerAs: 'vm'
    }
},

after data object and move resolve out of the $uibModal.open. Then there is a bit of change in your controller. Make clear function look like that:

function clear () {
    $state.go('^');
}

and replace $uibModalInstance.close(result); with $state.go('smthn', {}, { reload: 'smthn' }); in onSaveSuccess.



来源:https://stackoverflow.com/questions/40424898/disable-modal-in-jhipster-angular-ui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!