我有一個路由器插座在我的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