I'm trying to create custom-tabs web-component using polymer-dart
. The component itself is a tab container, which can have a custom-tab elements inside of it.
I want to have an html like this:
<custom-tabs selected="three">
<custom-tab name="one">... content skipped ...</custom-tab>
<custom-tab name="two">... content skipped ...</custom-tab>
<custom-tab name="three">... content skipped ...</custom-tab>
</custom-tabs>
In custom-tabs
html file I want to have something like this:
<polymer-element name="custom-tabs">
<template>
<div class="tabs">
<content select="custom-tab"></content>
</div>
<nav>
For each of custom-tab I want to create tab header (link) here
</nav>
</template>
</polymer-element>
Is it possible to:
- For each custom tab inserted into
.tabs
create link inside div? - If
custom-tab
element has a property named 'caption', can I get it using some kind of{{attribute-name}}
syntax?
Finally I want to look the component like this:
P.S. I only need help on polymer-dart <template>
syntax, I can deal with css myself. Thanks in advance!