Currently if I want to reload a state, I have to use the $state.reload(). This causes a full page refresh, which is very unfriendly. I am looking for a way to just re-resolve my dependencies and reset the controller. Is this possible?
相关问题
- Separate AngularJS Controllers Into Separate Files
- Angular 5 Universal (SSR) with dotnet core not wor
- Maintain state of Search page after navigating bac
- ionic how to add blank page as home page of the ap
- Ui-router 1.0.0.beta1 $transitions.onSuccess from
相关文章
- How can I clear all the AngularJS $scope and $root
- Pass complex object to ui-sref params
- How to get data from Route or ActivatedRoute when
- angularjs ui-router: Get list of child states of a
- Getting the name of a state in its `onEnter` hook
- Changing state without changing browser history in
- Ionic tabs and side menu navigation issue
- How do I load UI-router ui-view templates that are
you can try with:
it will force transition even if the state or params have not changed without full page refresh. you can pass the state + the params + reload options.
for details look here at "go" method.
Just to add on @Dag 's answer:
Do note, as of 0.2.14 you also have an option to just reload the current state and not it's parent.
So
$state.go(people.search, {}, {reload: true});
would reload thepeople
state as well as all its childs.While
$state.go(people.search, {}, {reload: "people.search"});
would not reload thepeople
state but would reloadpeople.search
and its childs.