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

Better support for dynamically adding routes - in nested routers #129

Open
juicyarts opened this issue Jun 12, 2015 · 1 comment
Open

Better support for dynamically adding routes - in nested routers #129

juicyarts opened this issue Jun 12, 2015 · 1 comment

Comments

@juicyarts
Copy link

Im having some issues with nested app-routers.

In my application i have a main router which initializes the main route with a wildcard:

  • e.g: /:aId/landing/*

This router gets populated by an Array of a Polymer-Element thats wrapped around the router and initializes manually via 'router.init()` int the elements ready function and init="manual" on the router element.

The Path that lies underneath initializes a nested app-router that needs to be populated dynamically too.
There are no errors but it seems like app router doesn't resolve the dynamic routes in the nested router.

so something like this:

<some-custom-element>
 <app-router  id="a" init="manual">
   <template is="dom-repeat">
    <app-route path="/:aId/landing/*" import="some-other-custom-element"> <!-- this one is populated properly -->
    <some-other-custom-element>
     <app-router ="b" init="manual">
      <template is="dom-repeat">
      <app-route path="/:aId/landing/static" import="static-element"> <!-- this one looks like its populated but the route wont return the needed import element -->
...

to test if there is an implementation error i cloned one of these dynamic nested routes and hard coded it into the nested router. When i do that everything works, so there must be an issue with the manual initialization of nested routes i think. Do you have any experience with this kind of issue or can you help me solve this?

The project im working on is available here : https://github.com/juicyarts/wbm-polymer/tree/develop

@juicyarts
Copy link
Author

i managed to get it working by setting a Timeout but to me that doesn't seem to be the best approach to solve this issue.

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

No branches or pull requests

1 participant