【发布时间】:2018-04-24 06:49:35
【问题描述】:
这是我的路线。
export const routes: Routes = [
{path: '', redirectTo: '/login', pathMatch: 'full'},
{path: 'login', component: LoginComponent, canActivate: [dbs.ConfigGuard]},
{path: '**', component: PageNotFoundComponent }
];
export const routing: ModuleWithProviders = RouterModule.forRoot(routes);
我想动态生成path names。
点赞{path : xyzService.getKey('login'), component: LoginComponent}
所以,我的问题是,我怎样才能在这里注入我的xyzService 来实现这一点。
【问题讨论】:
标签: node.js angular typescript angular4-router