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
I am trying to query information and found that $stateParams carries the proper information, but $state.params does not. This is not a big deal but I found it an unpredictable behavior. The REASON I opt to inject $state instead of $stateParams is because if the query fails I'd like to push the user to a different state instead.
I may be slightly noobish in that I'm not entirely sure what occurs when a resolve-promise gets rejected. Is there a way to specify a new route/state to switch to? I'm okay with doing it programmatically, I just was wondering what the standard Angular behavior was anyway.
The text was updated successfully, but these errors were encountered:
The reasons here are largely the same as your previous issue, and in your case here you should actually inject both.
With regard to rejected transitions, there are two possible paths: either a transition is rejected outright, in which case you don't go anywhere (the current state is retained), or, it can be superseded by a new transition that goes somewhere else entirely (i.e. by calling $state again).
Topic.
I am trying to query information and found that
$stateParams
carries the proper information, but$state.params
does not. This is not a big deal but I found it an unpredictable behavior. The REASON I opt to inject$state
instead of$stateParams
is because if the query fails I'd like to push the user to a different state instead.I may be slightly noobish in that I'm not entirely sure what occurs when a resolve-promise gets rejected. Is there a way to specify a new route/state to switch to? I'm okay with doing it programmatically, I just was wondering what the standard Angular behavior was anyway.
The text was updated successfully, but these errors were encountered: