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
Auxilary routes are broken #4945
Comments
@choeller Correct. There is no way currently to generate urls for auxiliary routes, but to get your example working you need to use.
|
Ok thank you! So I think there are 2 problems 1.) It is not possible to create the link 2.) It is not possible to link to guestbook without passing the aux-route - or am I getting the concept wrong? In my understanding the aux-route part has to be optional - otherwise I could just put the content from the aux-route in the template. I'm not sure if this is the right place for this discussion - but I also have some problems understanding the concept at all. When I say
and in config
then the whole config is totally static: In the sidebar I will always see the settings dialog. I would assume that I have an aux-route where I can load different templates. Can you shed some light on that? |
I ran into the same problem with the aux route not being optional. |
@choeller Yea, I think that's a bug also. If you have a named outlet, currently you have to populate the auxiliary route also or it throws an error. |
Seems to be fixed. |
I'm having similar issue with the auxiliary routes, I can access them by using the router navigate(), but when trying to access directly from the url path, it throws this exception: I'm using beta.2. |
@jmsegrev Yes - this is what I experience too. Seems my original problem is fixed, but when having an aux-route open reloading the page leads to
|
I have also seen the "TypeError: Cannot read property 'child' of null", but it seems to only happen if I try to define an aux route for a child route. If the aux route is at the root level it seems to work.
However, I have noticed that when I activate the aux route it rewrites all other links on the page to also contain the (aux) parameter. It might be due to a configuration issue on my end, but the only way to "defeat" the aux route is to manually remove it from the url or do a redirect from code. |
@thelgevold @choeller currently aux routes work on either root level routes |
@brandonroberts Ok thanks for the explanation. One question though. If they remain active on other routes than the activating route, how do you remove the aux part if you want to navigate to a section where it's not wanted? |
@thelgevold good question. I don't know of a way to do it outside of "defeating" it. Like you said you have to navigate from code, or you could use a regular href with the aux route in it but either way you're working around the system. I think the main issue is that we want aux routes to work like named ui-views in ui-router, but that's not there intent as I understand it. They are suppose to work independently of your "normal" routes instead of in addition to them. |
Yeah, I have open questions around this as well. |
@brandonroberts Thanks for the info. So I'm still not sure if the
Error is because of a bad config on my side, or if it's a bug - I tried to create the aux-route in the RouteConfig of a nested route. It get's activated correctly, but causes the error on reload. Did you experience the same? So I have
Task-Component
and the route like this:
|
@choeller Yep, I've seen the same thing. I think its a combination of both. Aux routes are only supported on root level route configs, so you'd need to move I've also seen that even with your aux route in the root level route config, if you navigate to a nested route, the aux routes are carried over, but on refresh the aux routes are dropped. Here is my plunker with some Aux Routes: http://plnkr.co/edit/5mp8pXsWuLt2yAIQgV3p?p=preview |
This issue was made obsolete by router v3: https://angularjs.blogspot.com/2016/06/improvements-coming-for-routing-in.html If you believe this is not the case, please file a new issue updating the description to router v3. thank you! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In alpha.44 I don't get aux routes running at all.
creating an aux route with this config
always leads to the following exception:
originating in router.js. The following plnkr demonstrates the error:
http://plnkr.co/edit/Oh5ypPwZVkeQrA1cImEg?p=preview
The text was updated successfully, but these errors were encountered: