I am facing an issue that may appear to be a duplicate, but I have already tried the following solutions without success:
- $location.search('lang', null)
- $location.url($location.path());
- $location.$$search = {};
The Issue:
Upon initial redirection to my Angular app, the URL looks like:
After processing the language in my Asp.Net controller (on BeginExecuteReady
), I want to remove the parameter and question mark i.e. "?lang=en-US". However, I have disabled HTML5Mode for the app. Some threads in Angular suggest that it may not be possible due to:
changing anything but the hash without html5 history will result in a browser reload.
I am seeking guidance on this issue. Any help would be appreciated.