最佳答案
我有一个单独的路由设置文件的组件:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { Route } from '../core/route.service';
import { extract } from '../core/i18n.service';
import {CalendarThematicPlanComponent} from './calendar-thematic-plan.component';
const routes: Routes = Route.withShell([
{ path: 'calendar', component: CalendarThematicPlanComponent }
]);
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
providers: []
})
export class CalendarThematicPlanRoutingModule { }
当我输入 URL 地址: http://localhost:4200/calendar
时,我被重定向到主页。
如何追踪角度2的路由?