I have following route in app-routing.module.ts:
const routes: Routes = [
{ path: 'component1', component: Component1},
{ path: 'component2', component: Component2},
];
When I run the application locally from localhost:4200, the routing takes place as expected.
When I deploy the same application in a tomcat server with a base path as below:
(http://localhost:4200) is now equivalent to (http:development.project.azure.com/project)
When I hit the above server url, my application is loading fine. But when I try to navigate to other components I get 404.
I believe the root cause of this should be the extra base path (/project) due to which (/project/component1) is not matching the (/component1) defined in my route and I get 404.
I tried to change the route as (/project/component1) but still didnt work.
How do I achieve routing when I have a base path in my url.