Good day folks,
I am having this issue in my Angular 2 application upon server startup (npm start
).
I redirect the base route or base path to
The () =>
notation actually worked for me. Below is my code regarding how I fixed it just by editing my routes.ts file
app/routes.ts
import { UserModule } from './user/user.module';
export const appRoutes:Routes = [
{ path: 'user', loadChildren: () => UserModule},
{ path: 'login', component: LoginComponent},
{ path: '', redirectTo: 'user/login', pathMatch: 'full'}
]