Skip to content

feat(uiSref): add ui-sref-on to expose transition promise #1877

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
wants to merge 1 commit into from

Conversation

lordnox
Copy link

@lordnox lordnox commented Apr 13, 2015

Fixes #1863

@see #1863

@nateabele
Copy link
Contributor

Looks like one of the tests failed?

@lordnox
Copy link
Author

lordnox commented Apr 14, 2015

Hm.. could it be that the return value of $state.go differs when run on travis or it might be just the karma:past test I missed...
Should it not return a promise? sigh

The only solution I can think of is to wrap the returned value in a $q.when()...
here: https://github.com/raynode/ui-router/blob/master/src/stateDirectives.js#L140

@nateabele
Copy link
Contributor

The only solution I can think of is to wrap the returned value in a $q.when()...
here: https://github.com/raynode/ui-router/blob/master/src/stateDirectives.js#L140

Yeah, I think that's basically what the rest of the tests do. You could also check out the $resolve tests, which have a couple wrappers for testing promises. Thanks. Let me know if you need any help.

wms added a commit to wms/ui-router that referenced this pull request May 23, 2015
wms added a commit to wms/ui-router that referenced this pull request May 23, 2015
@nateabele
Copy link
Contributor

Closing in favor of #1986.

@nateabele nateabele closed this May 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: Add a ui-sref-resolve directive similar to ui-sref-active(-eq)
2 participants