Monday, July 29, 2019

javascript - How to update the URL in the address bar but without reload to that URL?

How to update the URL in the address bar but without reload to that URL?



I found 2 solutions :




Solution 1:
Read here https://stackoverflow.com/a/4059844/2642351
Using window.history.replaceState.
However, when I implement it in my angularjs project it reverts back the URL immediately ot the previous one.



Solution 2:
Read here https://stackoverflow.com/a/24102139/2642351
This works for ngRoute however, Im using uiRouter. Is there a similar solution in uiRouter?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...