我安装webpack,一切都很好,但路由不再工作了,
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 :(得分:0)
我发现了我的错误,而是"开始":" webpack-dev-server",在我使用的package.json中,"开始":&#34 ;同时运行构建:观察\" \" npm run serve \"",