Why are all routes redirecting to root ?
Posted: 01 Jan 2019, 16:21
I have created different components and set the route for them in the routes.
For eg this one -
{path: 'customers', component: CustListComponent},
But its not working, the app renders the component if I change the <router-outlet></router-outlet> to <app-cust-list></app-cust-list> . But with the <router-outlet></router-outlet> , when I run the app and go to localhost:4200/customers - it does not render the customer component and falls back the DashboardDemoComponent which is set as the default component for the empty path . Whats wrong ? I have spent hella lot of time finding a solution for this and nothing seems working.
I am really short of time and I am unable to proceed building the app without the solution for this. Plz help ASAP.
For eg this one -
{path: 'customers', component: CustListComponent},
But its not working, the app renders the component if I change the <router-outlet></router-outlet> to <app-cust-list></app-cust-list> . But with the <router-outlet></router-outlet> , when I run the app and go to localhost:4200/customers - it does not render the customer component and falls back the DashboardDemoComponent which is set as the default component for the empty path . Whats wrong ? I have spent hella lot of time finding a solution for this and nothing seems working.
I am really short of time and I am unable to proceed building the app without the solution for this. Plz help ASAP.