我的角度为4的项目具有以下层次结构
在每个routes.ts文件中我有以下路由设置:
const appRoutes:Routes=[
{
path: "fUsers",
loadChildren: "./fUsers/fUsers.module#FUsersModule",
},
{
path: "lUsers",
loadChildren: "./lUsers/lUsers.module#LUsersModule",
}
]
const fUsersRoutes:Routes=[ {
path: "home",
loadChildren: "./home/home.module#HomeModule",
}
]
const lUsersRoutes: Routes =[
{
path: "home",
loadChildren: "./dashboard/dashboard.module#DashboardModule",
}
]
const homeRoutes:Routes = [
{
path: "",
component: HomeComponent
}
]
const dashboardRoutes: Routes=[
{
path: "",
component: DashboardComponent
}
]
当我导航到 / fUsers / home 时,一切正常,但当我导航到 / lUsers / home 时,找不到页面
我错过了什么?
由于
答案 0 :(得分:0)
好的发现我忘了更改文件夹名称,在lUsers下我将仪表板文件夹更改为主页......