2016-07-30 7 views

答えて

0

作業デモhttps://plnkr.co/edit/hXJ6ZRv81kt4rvWhxoBD?p=preview

const routes: RouterConfig = [ 

     { path: '', redirectTo: 'home', terminal: true }, 
     { path: 'home', component: HomeComponent}, 
     { path: 'dashboard', component: DashboardCompnent} 

]; 
+0

使用pathMatch:代わりに、端末の 'フル':真の3.0.0-beta2のルータ –

+0

における重要性のためかいただきました使用pathMatchまたは端末が何でありますか? – Gary

+0

'RedirectTo'は特定のパスにリダイレクトするために使用されます。' PathMatch'は接頭辞または接尾辞でパス(正確なパス)または一致するパス(例えば 'dash'で始まる)をチェックするために使用されます。 – micronyks

関連する問題