如何声明视图直接点击打开为模态?Durandal路由器 - 如何将视图定义为模态路径定义
我的路线的定义是:
var routes = [
{ route: '', moduleId: 'home', title: 'My Apps', nav: true },
{ route: 'aboutus', moduleId: 'aboutus', title: 'About Us', nav: true },
{ route: 'help', moduleId: 'help', title: 'Help', nav: true },
{ route: 'faq', moduleId: 'faq', title: 'FAQ', nav: true },
{ route: 'contactus', moduleId: 'contactus', title: 'Contact', nav: true }
];
我想开“联系我们”模块作为当前屏幕上的模态对话框 - 不想导航到另一个视图。
不知道该如何实现。 非常感谢您的建议。
你不从你的路由器做到这一点。在您的shell视图模型中,您可以显示应用程序共享的模式。按照这些说明 - http://durandaljs.com/documentation/Showing-Message-Boxes-And-Modals.html –