本文介绍了在Jhipster/Angular UI中禁用模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Jhipster生成的应用程序中禁用模式对话框,而支持页面中显示的元素.
I would like to disable modal dialogs in a jhipster generated application in favor of elements displayed in page.
请参见 https://github.com/jhipster/generator-jhipster/issues/2693
推荐答案
您应该像上面的"-detail"状态那样进行设置.做一个像
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'
}
},
将
放在data
对象之后,然后将resolve
从$uibModal.open
中移出.然后,您的控制器会有一些变化.使clear
函数看起来像这样:
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('^');
}
,然后将$uibModalInstance.close(result);
替换为onSaveSuccess
中的$state.go('smthn', {}, { reload: 'smthn' });
.
这篇关于在Jhipster/Angular UI中禁用模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!