angular ui-router: how do I reload a state when a path parameter changes but not reload when a query parameter changes?
angular-ui, angular-ui-router, angularjs, javascript
Solution
This is a bug in UI-Router that was fixed in release 0.2.15:
https://github.com/angular-ui/ui-router/releases
Upgrading to the latest will fix the issue
Problem
For example, I want this change in navigation to reload the state: - `#/detail/1` - `#/detail/2` But I do not want this navigation to reload the state: - `#/detail/1?search=blah` - `#/detail/1?search=huzzah` According to the ui-router documentation, setting `reloadOnSearch: false` should accomplish this, but try the plunk below. When `reloadOnSearch === false`, changing the path parameter doesn't reload the state even though the documentation says it should. Plunkr: http://run.plnkr.co/ZPy9uabYlkMilwdS/#/param