Error: Unable to find module with ID: welcome when using aurelia-cli webpack with the skeleton-nav
Error: Unable to find module with ID: welcome when using aurelia-cli webpack with the skeleton-nav
我已将框架导航复制到 aurelia-cli webpack 项目的基础安装中,但出现错误:无法找到 ID 为 welcome
的模块
你有没有像这样用 PLATFORM.moduleName(...) 设置 moduleId?
config.map([
{ route: ['', 'welcome'], name: 'welcome', moduleId: PLATFORM.moduleName('./welcome'), nav: true, title: 'Welcome' },
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" }
]);
}
我已将框架导航复制到 aurelia-cli webpack 项目的基础安装中,但出现错误:无法找到 ID 为 welcome
的模块你有没有像这样用 PLATFORM.moduleName(...) 设置 moduleId?
config.map([
{ route: ['', 'welcome'], name: 'welcome', moduleId: PLATFORM.moduleName('./welcome'), nav: true, title: 'Welcome' },
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" }
]);
}