angular / ngMigration-Forum

109 stars 7 forks source link

Browser history, $location.search() and reloadOnSearch: false #7

Closed jpzwarte closed 6 years ago

jpzwarte commented 6 years ago

So we have a hybrid app that has angular.js routes with the angular.js router that uses reloadOnSearch: false. We then change the query params in the url without the page reloading ($location.search('id', newId);).

This worked fine before we were a hybrid app: using the browser back button skipped al the $location.search changes in the URL.

Since we're a hybrid app, this is a different story: the angular router sees every $location.search change as new history state. So now when we use the browser back button, we have to click on the button for every change. For end users using the back button of the browser instead of the application UI this is really bad UX.

Anybody how you can tell the angular router to ignore those changes?

jpzwarte commented 6 years ago

I believe this issue is incorrect.