Routing not working in production
When building use the --base-href property as follows:
ng build --prod --base-href /hrms
You have to change your base tag
in your index.html
file:
<base href="/">
to <base href="/hrms">
This tag is used by angular router to know where is the base of every route, that's why it's not working in production while it works in dev.