我必须访问技能路线,这对我来说是不可能的.我已经尝试了很多方法,但是我无法按照代码结构访问技能路线.我的想法是能够访问仪表板模块的子路径
非常感谢你提前.
// app.routing.module.ts
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
// components for route controller
import { HomeComponent } from './components/home/home.component';
const routes: Routes = [
{
path: '', redirectTo: 'home', pathMatch: 'full'
},
{
path: 'home', component: HomeComponent
},
{
path: 'dashboard',
loadChildren: '../app/modules/dashboard/dashboard.module#DashboardModule'
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Run Code Online (Sandbox Code Playgroud)
....
// dashboard.routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from …Run Code Online (Sandbox Code Playgroud)