Hiding URL endpoint in a Angular Application

Viewed 26

I am having a use case where we are having an Angular Application -

  1. The endpoint of displayed URL in the address bar is like -

example.com/dashboard/userRole

Where userRole can be of more than 2 types.

  1. What I want to achieve is only the domain name should be displayed on the address bar, endpoint like userRole, dashboard should not be visible.

  2. Tried using skipLocationChange strategy in routing but whenever user refreshes the page it takes back to the root component i.e, LoginComponent.

Can anyone suggest a way to achieve this?

0 Answers
Related