-
Notifications
You must be signed in to change notification settings - Fork 3k
$stateChangeStart event is not providing the options #1620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
👍 I have the same problem as well. |
👍 Just caught this trying to figure out #1007 |
👍 |
Same problem here |
+1! |
👍 |
1 similar comment
+1 |
+1. |
+1 |
1 similar comment
+1 |
Any updates on this from the angular-ui team? Is there a plan to solve this in a newer version? |
Any Updates on this ? I am facing the same issue |
+1 |
3 similar comments
+1 |
+1 |
👍 |
The upcoming release will have new APIs that obviate this. |
+1 |
is this fixed in 0.2.15 ? |
👍 |
I think we can add |
Any news on this? |
+1 |
2 similar comments
+1 |
+1 |
|
- Add options as a 5th parameter to the $stateChangeStart event - As per angular-ui#1620
👍 |
- Add options as a 5th parameter to the $stateChangeStart event - As per angular-ui#1620
To check whether the user is authorized for a certain state, i implemented an interceptor which listens to the $stateChangeStart event. After checking the rights, I resume the transition with the following code:
I notify the stateChangeSucces by hand to prevent endless loops here. The problem is that state.go calls which provides optional options (like reload:true) are not provided by the $stateChangeStart event. This prevents resuming the started transition correctly (because the provided options as originally passed to the state.go method are lost).
Alternative would be to provide a method like $state.resume() which can be used to resume a prevented state transition which takes into account the passed params and options.
The text was updated successfully, but these errors were encountered: