如何在同一个路由模块中获取 id 的值?
const routes: Routes = [
{
path: 'departments/:id',
component: HrComponent /* (id==='hr')?HrComponent:ITComponent;*/
}];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class DynformRoutingModule { }