Nested Template is not working in polymer 1.0

191 views
Skip to first unread message

Sathish Kumar

unread,
Aug 3, 2015, 10:42:37 AM8/3/15
to Polymer
I have created like below code but its not working and also i have attached my files please tell what is the mistake i made 

 <template>
    <template repeat="{{ letter in letters }}">
      <div id="commonRenderBack" flex vertical layout>
        <content></content>
      </div>
    </template>
  </template>



index.html
meter.html
needle.html

Eric Bidelman

unread,
Aug 3, 2015, 12:17:50 PM8/3/15
to Sathish Kumar, Polymer
Iterative templates in 1.0 are a bit different. Please see: https://www.polymer-project.org/1.0/docs/devguide/templates.html#nesting-templates


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/b5f658ee-0f87-4a6d-9b27-cb5891870d1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nelson Silva

unread,
Aug 19, 2015, 1:38:36 PM8/19/15
to Polymer, sathish....@gmail.com
Hi,

Despite the different syntax for iterative templates should it be possible to use an insertion point inside a "dom-repeat" ?

For instance, if I have "x-list":

<dom-module id="x-list">
  <template>
    <template is="dom-repeat" items="{{items}}" as="item">
      <content></content>
    </template>
  </template>
  <script>
    HTMLImports.whenReady(function() {
      Polymer({
        is: 'x-list',
        properties: {
          items: {
            value: [1, 2, 3]
          }
        }
      });
    });
  </script>
</dom-module>

should I be able to:

<x-list>
  <div>item <span>[[item]]</span></div>
</x-list>

?
Reply all
Reply to author
Forward
0 new messages