app-router icon indicating copy to clipboard operation
app-router copied to clipboard

How to rewrite polymer element content with app-router?

Open Colstuwjx opened this issue 10 years ago • 3 comments

Hi , I met an issue about app-router & polymer, it just likes:

    <gaea-scaffold username="test_user">
        <!--  here is some extra content -->
        <div class="ui steps">...</div>
    </gaea-scaffold>

    <!-- gaea-scaffold definition -->
    <polymer-element name="gaea-scaffold" attributes="username">
        <!-- content could be rewrite -->
        <core-scaffold>
            ...
            <content class="content">
            </content>
            ...
        </core-scaffold>
    </polymer-element>

    <!-- it works!! But turn to app-router, what it should be? -->
            <app-router>
            <app-route path="/" import="/static/Gaea/elements/gaea-scaffold.html" element="gaea-scaffold">
                <!-- add here?? I tried but it doesn't work... -->
                <div class="ui steps">...</div>
            </app-route>
        </app-router>

What should I do?? Wishes your reply.

Colstuwjx avatar Feb 13 '15 07:02 Colstuwjx

Sorry, I'm really not sure what you're asking here.

erikringsmuth avatar Feb 16 '15 21:02 erikringsmuth

I just wonder how to fill out the custom element's in app-router. Thanks.

Colstuwjx avatar Feb 17 '15 04:02 Colstuwjx

Would the following syntax help you?

<app-route path="/">
    <template>
        <gaea-scaffold username="test_user">
            <!--  here is some extra content -->
            <div class="ui steps">...</div>
        </gaea-scaffold>
    </template>
</app-route>

As for the import, I do not know if you can have the import="/static/Gaea/elements/gaea-scaffold.html" when using a template tag. (I never tried it). I usually do all my imports at the top of the file, something like:

<link rel="import" href="/static/Gaea/elements/gaea-scaffold.html">

popbee avatar Mar 20 '15 03:03 popbee