dartlangfr / game-store-codelab

Learn how to build a webapp with Dart and Polymer
Apache License 2.0
9 stars 5 forks source link

Iterating over elements don't work anymore in tables #5

Closed vferries closed 10 years ago

vferries commented 10 years ago

This piece of code for the view as list part don't work (anymore?) :

<table>
  <tbody>
    <template repeat="{{game in games | filterSearch(search) | sortBy(sortField, sortAscending)}}">
      <tr>
        <td>{{game.name}}</td>
    <td>{{game.genre}}</td>
    <td>{{game.rating | toStars}}</td>
      </tr>
    </template>
  </tbody>
</table>

This one works instead :

<table>
  <tbody>
    <tr template repeat="{{game in games | filterSearch(search) | sortBy(sortField, sortAscending)}}">
        <td>{{game.name}}</td>
    <td>{{game.genre}}</td>
    <td>{{game.rating | toStars}}</td>
    </tr>
  </tbody>
</table>

Interesting discussion here on these subjects

I'll try to make a Pull Request for this point too. Quite long with so many branches, do you want a PR for each one? Or just the end state alone?

ggirou commented 10 years ago

Thanks again for your help. I made samples directory and copied all user-story-* branches in it. It will be easier for you to submit your PR on the master branch only.

Also, I'll make a script to automatically recreate all user-story-* branches from this directory.