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

Does app-router support dynamically created routes? #114

Open
araad opened this issue Apr 11, 2015 · 1 comment
Open

Does app-router support dynamically created routes? #114

araad opened this issue Apr 11, 2015 · 1 comment

Comments

@araad
Copy link

araad commented Apr 11, 2015

I'm trying to include a "template repeat" to dynamically create routes, even though they are being rendered, they are not triggering any change when the url is changed.

<app-router core-animated-pages transitions="slide-from-right">
    <template repeat="{{section in sections}}">
        <app-route path="/{{section.name}}">
            <template>
                <p>{{section.name}}</p>
            </template>
        </app-route>
    </template>
</app-router>

Is that not supported?

@erikringsmuth
Copy link
Owner

The <app-router> only looks for <app-route> elements that are direct children.
https://github.com/erikringsmuth/app-router/blob/master/src/app-router.js#L205-L211

It works this way in case there are multiple nested routers so that the outer router doesn't use inner router's routes.

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

2 participants