2016-09-19 7 views

答えて

2

リダイレクトをとすると、以下のようになります。

ユーザーが原因redirectTowww.domain.com/userに移動しようとすると、彼は www.domain.com/user/profile にリダイレクトされます。

import { Routes,RouterModule } from '@angular/router'; 

let routes: Routes = [ 
    { path: '/user', redirectTo: '/user/profile', pathMatch: 'full'}, 
    { path: '/user/profile', component:somecomponent }, 
]; 

export const routing = RouterModule.forRoot(routes); 
+0

迅速な対応に感謝します。 –

+0

あなたは大歓迎です! – micronyks

関連する問題