这个问题可能与mu问题有关吗? https://github.com/aurelia/framework/issues/400
我有一个具有两个不同根的Aurelia应用程序,一个用于用户的loggen,另一个用于匿名用户.
我在其他Aurelia应用程序中根据此答案中的方法实现了app root 的操作.当login模块是一个没有其他路由的"隔离"模块时,这种方法非常有效,但我现在很难让它运行起来.
import {inject, useView, Aurelia} from "aurelia-framework";
import AuthService from "./services/auth-service";
@useView("app.html")
@inject(AuthService)
export class Index {
constructor(authService) {
this.auth = authService;
}
configureRouter(config, router) {
config.title = "Super Secret Project";
config.options.pushState = true;
config.map([
{ route: ["","home"], moduleId: "home", nav: true, title: "Beginscherm" },
{ route: "over", moduleId: "about", nav: true, title: "Over" },
{ route: "inloggen", moduleId: "account/login", nav: false, title: "Inloggen" …Run Code Online (Sandbox Code Playgroud)