Skip to content

Conversation

@gsklee
Copy link

@gsklee gsklee commented Jul 9, 2013

I added a transitionToParent() method since I found this being a must-have method when doing nested states and views. Was doing some manual splitting and joining with $state.current.name before discovering $state.$current.parent.self.name, so I believe this is worth a public API and some documentation.

Actually, I think the name of the method is too verbose; I name it this way to make it looks like existing methods. It would be great if transitionTo() can simply be to() so this method can be called toParent().

@nateabele
Copy link
Contributor

I don't think we want to bloat the API with a bunch of case-specific transition methods. This is already being worked on as part of $state.go() (#15), which will allow relative transitions to parents, grandparents, children, siblings, etc.

Also, this method doesn't handle parameters at all, whereas $state.go() will correctly handle cascading parameter inheritance.

@gsklee
Copy link
Author

gsklee commented Jul 10, 2013

Oh, I dunno there's such a plan, and it indeed looks better.

@gsklee gsklee closed this Jul 10, 2013
@gsklee gsklee deleted the gsklee/transitionToParent branch July 10, 2013 09:13
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