1

This question may seem a duplicate and it can be. But I have tried the below solutions which do not seem to work:

  1. $location.search('lang', null)
  2. $location.url($location.path());
  3. $location.$$search = {};

Question:

When I first redirected to my angular app Url looks like:

http://subdomain.domain.com/?lang=en-US#/UserList

As it hits my Asp.Net controller(on BeginExecuteReady) I process the language and set culture. And now want to remove the param and question-madrk i.e. "?lang=en-US".

And I have HTML5Mode off for the app. Some angular threads suggests its not possible as:

changing anything but the hash without html5 history will result in a browser reload.

Please guide me towards light.

1

1 Answer 1

1
$window.location.search = ''

This is the code that worked for me.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.