0

How can I append a div to each tr?

The following example is not working. It appends a div to table, instead of each tr

<table>
<tr repeat="{{ el in elements }}">
  <td>{{ el.name }}</td>
  <div> This tag I want to append to tr tag </div>
</tr>
</table>
itsnikolay
  • 16,222
  • 4
  • 62
  • 62
  • 1
    Your second `tr` is not a closing tag i.e. ``. Might that be the problem? – Alexander Weber Apr 27 '15 at 17:59
  • 1
    I think it's not polymer issue, as I know `tr` can only have `td` or `th` direct descendant; have you checked [this post](http://stackoverflow.com/a/7051236/2407522) and [this](http://stackoverflow.com/a/2974609/2407522). – Walid Ammar Apr 28 '15 at 10:59

1 Answers1

0

This prints a lot of <td> but I am not sure what you are looking for. Try it

<table>
<tr>
    <template repeat="{{ el in elements }}">    
         <td>{{ el.name }}</td>
    </template>

    <div> This tag I want to append to tr tag </div>
</tr>
</table>
zdarsky.peter
  • 6,100
  • 8
  • 35
  • 58