I have a controller where I sometimes update the location using $location.search({param1: newParam1Value)
.
When I purposely change $location.search in the controller I would like to prevent a reload. Otherwise, I want to keep the default reloadOnSearch
behavior for this route/state.
I can set reloadOnSearch
to false when I define the state but then it will always be false.
Is there a way to toggle the reloadOnSearch
for the route from within the controller? Alternatively, can I keep reloadOnSearch: true
and just prevent reload some other way for the one instance where I don't want it to happen?
I am using ui.router
.