I have a little Angular2 app, i have created 2 components, 'main' and 'dashboard'
I have created this button to access the dashboard page:
<button md-raised-button class="md-primary" [routerLink]="['/dashboard']">Dashboard</button>
When i deploy locally with 'ng-serve' i can access the page without any problem directly:
But when i try the same in production i get a 404:
Accessing the dashboard page via the button link does not give me any problem, in production or development env
I have in my 'app.module.ts' the folllowing routes set:
const appRoutes: Routes = [
{ path: 'dashboard', component: DashboardComponent },
{ path: 'table', component: MainComponent },
{ path: '**', component: MainComponent }
];
In the imports then i configure the router like so:
RouterModule.forRoot(appRoutes)
And in development environment this works just fine, all code is committed and updated, i made sure i run the same code, like 5 times