2016-07-30 5 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 : 무슨 일이 pathMatch 또는 터미널이 의미 또는 무슨 사용 3.0.0 - 베타 2 라우터 –

+0

에서 진정한 '전체'대신 터미널? – Gary

+0

'RedirectTo'는 특정 경로로 리디렉션하는 데 사용됩니다.'PathMatch'는 경로 (정확한 경로) 또는 일치하는 경로 (예 :'dash'로 시작)와 접두어 또는 후행을 검사하는 데 사용됩니다. – micronyks

관련 문제