我有一个路由器插座在我的app.html .problem是我有3(后,管理员,addposts)组件除了app.component .in我的帖子组件我有下拉菜单onece我点击下拉我想加载addposts和url应该看起来像这个post/addposts。任何想法如何做到这一点Angular 2 Routes
这是我app.routes.ts
const routes: Routes = [
{ path: '', redirectTo: 'main', pathMatch: 'full'},
{ path: 'main', component:AdminBodyComponent },
{ path: 'admin', component:AdminComponent },
{ path: 'posts',component:PostsComponent},
{ path: 'addposts',component:AddPostComponent}];
请加标点符号,正确的大写和空格你的问题。另外,请在标题中提出实际问题。 – 2017-04-26 04:18:32