app-router
app-router copied to clipboard
How to rewrite polymer element content with app-router?
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.
Sorry, I'm really not sure what you're asking here.
I just wonder how to fill out the custom element's
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">