You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent fix for #1079, while it did fix the problem of not reloading the state when reloadOnSearch: false, did however break the History API's ability to navigate using the back and forward buttons on the browser.
Before, if I added all query parameters to the state's url, the back and forward buttons would invoke the controller so that I could run the same code as if I manually changed the state. However, even in your plunker example http://plnkr.co/edit/5OPoKUDnn98JiKFlyEYL?p=preview, if I hit the back and forward buttons the controller is no longer called even though the query parameters are changing. I guess technically this is the defined behavior, but developers have no control over the browsers back and forward buttons to run code off those changes.
You can see the work arounds I had to implement in 0.2.13 to be able to change query parameters without reloading the state while still having back and forward ability on this stack overflow answer: http://stackoverflow.com/a/29262392/2124254
The text was updated successfully, but these errors were encountered:
If the state isn't reloading, then the controller fn should not be invoked. States with reloadOnSearch are probably be fetching data without a resolve or transition, yes? Try adding a $watch for $stateParams inside a reloadOnSearch=false controller to update your search fetches, based on some query parameters.
Until we get dynamic params implemented, there won't be a clean solution that works for every situation. 👎
I'm struggling with the workaround as I've never used $location.search(). Anyone have any good examples of a search with a submit and redirect to another page? Is there anything that works with ui-sref links?
The recent fix for #1079, while it did fix the problem of not reloading the state when
reloadOnSearch: false
, did however break the History API's ability to navigate using the back and forward buttons on the browser.Before, if I added all query parameters to the state's url, the back and forward buttons would invoke the controller so that I could run the same code as if I manually changed the state. However, even in your plunker example http://plnkr.co/edit/5OPoKUDnn98JiKFlyEYL?p=preview, if I hit the back and forward buttons the controller is no longer called even though the query parameters are changing. I guess technically this is the defined behavior, but developers have no control over the browsers back and forward buttons to run code off those changes.
You can see the work arounds I had to implement in 0.2.13 to be able to change query parameters without reloading the state while still having back and forward ability on this stack overflow answer: http://stackoverflow.com/a/29262392/2124254
The text was updated successfully, but these errors were encountered: