Is there a way to programmatically add states to $stateProvider after module configuration, in e.g. service ?
To add more context to this question, I have a situation where I can go with two approaches:
- try to force the reload on the state defined in the module configuration, the problem is that state has a reloadOnSearch set to false, so when I try $state.go('state.name', {new:param}, {reload:true}); nothing happens, any ideas ?
State definition
.state('index.resource.view', {
url: "/:resourceName/view?pageNumber&pageSize&orderBy&search",
templateUrl: "/resourceAdministration/views/view.html",
controller: "resourceViewCtrl",
reloadOnSearch: false,
})
- try to programmatically add states that I need to load from a service so routing can work properly. I'd rather go with the first option if possible.