Reputation: 18855
I remember in Angular, I was able to dynamically change the URL without re-loading the page simply by changing $location
Is this possible to do something similar in Meteor?
I've tried using Router.go but that does reload the page, clearing all the fields.
Upvotes: 0
Views: 479
Reputation: 8345
You can use pure JavaScript (in modern browsers) to change the URL without reloading the page. See https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history As an example, evaluate history.pushState({}, "A new page", "myNewPage.html")
in the console in your browser, and notice the change in the adressbar.
I guess Iron Router uses this under the hood when you change page.
Upvotes: 3