Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart web UI and iterating inside a table

I tried to iterate over data inside a table:

  <table>
    <template iterate="entry in data">
      <tr>
        <template iterate="value in entry.values">
          <td>{{ value }}</td>
        </template>
      </tr>
    </template>
  </table>

For some reason I'm getting this error message when I build:

Unexpected end tag (template) in table context caused voodoo mode.

It works fine when I iterate inside ul:

  <ul>
    <template iterate="entry in data">
      <template iterate="value in entry.values">
        <li>{{ value }}</li>
      </template>
    </template>
  </ul>

I imagined that using tables and iteration shouldn't be a problem.

like image 453
Kai Sellgren Avatar asked Feb 19 '13 12:02

Kai Sellgren


1 Answers

Looks like I found a solution, although I still do not know what the issue was:

<table template iterate="entry in data">
  <tr template iterate="value in entry.values">
    <td>{{ value }}</td>
  </tr>
</table>
like image 173
Kai Sellgren Avatar answered Sep 28 '22 12:09

Kai Sellgren