我已将骨架导航复制到aurelia-cli webpack项目的基本安装中,并且收到错误:无法找到带ID的模块:welcome
答案 0 :(得分:2)
您是否使用PLATFORM.moduleName(...)设置了moduleId?
config.map([
{ route: ['', 'welcome'], name: 'welcome', moduleId: PLATFORM.moduleName('./welcome'), nav: true, title: 'Welcome' },
答案 1 :(得分:0)
for typescript 为此您需要添加以下导入
从'aurelia-framework'导入{Aurelia,PLATFORM};
router: Router;
configureRouter(config: RouterConfiguration, router: Router): void {
this.router = router;
config.title = 'Aurelia';
config.map([
{ route: '123', name: 'index123', moduleId: PLATFORM.moduleName('./index'), title:"index" }
]);
}