Skip to content

Transitioning to state without notifying stops transition to happen #1727

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

Closed
alejandroiglesias opened this issue Feb 3, 2015 · 5 comments
Closed

Comments

@alejandroiglesias
Copy link

Hi, in order to make a special transition that should not be intercepted by listening to $stateChangeStart event, i'm calling $state.go with {notify: false} options object.

$state.go('proposal.level', null, {notify: false});

The problem is that the state is never transitioned to, only URL is updated. My version of uiRouter is 0.2.7. Can't update, sorry, since something stops working in the app around 0.2.10 (will try to check that in the near future, but not in the current timeframe available).
I would appreciate any suggestions in how to achieve my desired result.
Thanks in advance!

@nateabele
Copy link
Contributor

Please post a plunkr that demonstrates the issue, thanks.

@thewilli
Copy link

thewilli commented Aug 2, 2015

I had the same issue with UI Router 0.2.15.

I created a Gist with a MWE, as it is easier to play around with URL-based states.

The example checks whether a user is logged in (statically false in the MWE) and the redirects to a login page. When setting notify to false, only the URL is updated, but the template content is not set - the ui-view element is not filled at all.

@thewilli
Copy link

thewilli commented Aug 2, 2015

@nateabele as there is an example now, would you please consider removing the label you've assigned?

@eddiemonge
Copy link
Contributor

http://plnkr.co/edit/h3T8LK5o15zpRuIzrgFk?p=preview

notify false prevents the stateChange events from firing, which effectively prevents the state change from happening. I'm not really sure if thats the expected behavior. @nateabele ?

@eddiemonge
Copy link
Contributor

Nevermind. closing as a duplicate of #1158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants