Javascript DurandalJS 2.0.0:where是;“设置”;在新路由器中?
我正在尝试将我的应用程序从durandal 1.x转换为2.0.0 在1.x中,我可以使用以下代码映射路线:Javascript DurandalJS 2.0.0:where是;“设置”;在新路由器中?,javascript,durandal,Javascript,Durandal,我正在尝试将我的应用程序从durandal 1.x转换为2.0.0 在1.x中,我可以使用以下代码映射路线: router.map([ { url: 'home', moduleId: 'viewmodels/home/home', name: 'Home', visible: true, settings: { mySettings: ['mySettings'] } }, ... ]); 在2.0.0中有没有办法做到
router.map([
{ url: 'home',
moduleId: 'viewmodels/home/home',
name: 'Home',
visible: true,
settings: { mySettings: ['mySettings'] }
},
...
]);
在2.0.0中有没有办法做到这一点:将“设置”添加到路线
非常感谢。我误解了文档,答案是:
router.map([
{ route: 'home',
moduleId: 'viewmodels/home/home',
title: 'Home',
nav: true,
mySetting: ['mySetting']
},
...
]);