I was running my application on local server, it was working fine, when we hosted it, it started working okay untill i refreshed the page and the 404 error occured.
then i came up with the solution of using HashLocationStrategy. It worked very well. But it added up a '#' symbol in my url as 'http://everest.syslogix.ca/#/fastcom/admin-dash'. But it was working very well. After that i wanted to add linkedIn signIn in this application but it required a trusted url without the '#' symbol.
Now what should i do? I've searched all over the internet, tried many solutions but none of them worked for me. I want a URL either without hash which works fine while i reload the page. Or i want some way to enable URL with hash to be stored as a trusted URL on linkedIn.
Solved!!
1- Make a file web.config with the text as :-
2- Place this file inside the src folder. 3- Modify your angular.json file to include the web.config file, in the assets tag as :
"
4-ng build --prod 5-Publish and enjoy.