I am trying to implement the routing in the angular. The PathLocationStrategy is enabled in angular when a new project is created. The page is getting traversing as per the route normally when the application is running in the ng serve. After taking the build using ng build --prod and deployed the dist build code in another environment the page loads properly if the user didn't try to reload or move to the next URL. If the same is done URL Not Found error is displayed in the web page.
Due to Angular is an single page web application, the entire page is loaded in the user's browser and the page gets loaded dynamically based on the user action. Based on the index.html, the page will get loaded and displayed in the browser. The build is generating only the index.html and component related js file. So I searched in internet and found the another routing method HashLocationStrategy. This help the user to traverse into the page directly through URL.
Now my application wants to integrate with a gateway to perform some authentication with the user and redirect to my specific URL with the status of authentication in GET method. But the gateway is ignoring from the # character in the URL and the URL gets redirected to the server. I am hosting my application in Apache(HTTPD).
Any solution is available to traverse the URL directly from the user and handle the gateway response in Angular or Apache? Your suggestion will be helpful to resolve this problem.
Thanks in advance for your valuable inputs.