2017-03-05 68 views
0

我安裝的WebPack,一切都很好,但路由不工作了,角2的WebPack-dev的服務器,路由不工作

export const appRoutes: Routes = [ 
 
    { path: '', pathMatch: 'full', redirectTo: 'main' }, 
 
    { path: 'login', component: LoginComponent }, 
 
    { path: 'main', component: mainPage }, 
 
    { path: 'verification', component: Verification }, 
 
    { path: 'profile', component: Profile }, 
 
    { path: 'search', component: Search }, 
 
    { path: 'userProfile', component: UserProfile }, 
 
];

我安裝的WebPack路由工作正常之前

+0

你得到的錯誤是什麼? – Aravind

+0

已經找到解決方案我發佈它作爲答案 –

回答

0

我發現我的錯誤,而不是「開始」:「webpack-dev-server」,在我使用的package.json中,「start」:「concurrently」npm run build:watch \「\」npm run serve \ 「」,