Skip to content
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

Cannot register orphaned state #2546

Closed
redhead opened this issue Feb 10, 2016 · 9 comments
Closed

Cannot register orphaned state #2546

redhead opened this issue Feb 10, 2016 · 9 comments
Labels

Comments

@redhead
Copy link

redhead commented Feb 10, 2016

I'm trying out ui-router 1.0.0-alpha on our project, and once I start it, I get this message:

Error: Cannot register orphaned state 'top.bottom'

I guess that is because we configure states in run phase according to the papa guidelines and so the top state may have not been added before the child state.

Is it a bug or we should not use this approach and configure states only in config phase?

@christopherthielen
Copy link
Contributor

is this behavior different than 0.2.x?

@redhead
Copy link
Author

redhead commented Feb 11, 2016

Yes, in 0.2.x it didn't care in what phase the states were added.

@christopherthielen
Copy link
Contributor

thanks.

I'm surprised, because I thought we straight up ported the registration code without changing our unit tests.

Confirmed, this was from the initial commit 99d53ac of what became the 1.0 branch, and was never in 0.2.x

@nickeliah1
Copy link

Can I confirm whether this behaviour is a bug, or whether its best practise to configure states in the config phase?

@redhead
Copy link
Author

redhead commented Apr 28, 2016

My opinion: I think it should not be that restricted though as states could be added in later time (e.g. async loading modules). But lets see what devs will say.

@ramirezd42
Copy link

ramirezd42 commented Apr 28, 2016

@redhead 100% agree. This makes it impossible to define routes across modules as far as I can see which is limiting

@christopherthielen
Copy link
Contributor

I agree, I will back the orphan check out.
On Thu, Apr 28, 2016 at 5:37 AM Dave Ramirez [email protected]
wrote:

100% agree. This makes it impossible to define routes across modules as
far as I can see which is limiting


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#2546 (comment)

@jmtavares
Copy link

Do you have any updates here?

@christopherthielen
Copy link
Contributor

coming soon

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

No branches or pull requests

5 participants