Skip to content

Instantly share code, notes, and snippets.

Created Sep 15, 2014
What would you like to do?
polymer question
What I want is for the following:
<father name = "John">
<child name = "Bob">likes lolipops</child>
<child name = "Jessica">likes computers</child>
to generate:
John has two children, Bob and Jessica:
Bob: likes lolipops
Jessica: likes computers
Now, if we assume that the <child> polymer tag is properly implemented to spit out a div with "Bob: likes lolipops" as the contents, the father tag....
<polymer-element name = "father" attributes = "name">
<div layout vertical>
{{name}} has ???{count}??? children, ???{{ iterate child nodes, print out for each }}???<br/>
<!-- I dont know how ot access JS here, so not sure how to turn all child nodes into a children array -->
<content select = "child"></content>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment