Skip to content

Conversation

nateabele
Copy link
Contributor

I found this issue while trying to finish up the ui-sref directive.

Basically, if a state has a URL, but a child state does not, it is impossible to transition to the child state, because the change in location will immediately trigger a second state transition to the parent. This fixes the issue by checking to see if the current state is a child of a state being targeted for transition based on a URL match.

Also fixes a typo in a test name. :-)

@nateabele
Copy link
Contributor Author

@ksperling If I can get a review of this, it should be the last change needed to finish implementing and testing ui-sref.

@ksperling
Copy link
Contributor

Good catch! See my comment in the code regarding the particular check though... I think we need to check for $state.$current.navigable != state.

@nateabele
Copy link
Contributor Author

@ksperling Yeah good call. I've updated the patch. Go ahead and merge if it looks good.

ksperling added a commit that referenced this pull request Jun 19, 2013
Don't double-transition on child states with no URLs
@ksperling ksperling merged commit 85d04f6 into angular-ui:master Jun 19, 2013
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.

2 participants