2

Is there a way to combine polymer firebase-collection with iron-list?

I'm able to show my data with firebase-collection, but I also want to use iron-list to style my elements...

<firebase-collection data="{{games}}"
                  location="url">
</firebase-collection>

<template is="dom-repeat" items="{{games}}" as="game">
    <div>
      <span>{{game.home}}</span>
      <span class="game_score">
        <span>{{game.home_score}}</span> - <span>{{game.away_score}}</span>
      </span>
      <span>{{game.away}}</span>
    </div>
    </template>
Warri
  • 217
  • 1
  • 3
  • 14
  • I guess this is just an issue of data binding. Does the value of `games` change in the webinspector? Did you try `data$={{games}}`? – Kjell Sep 30 '15 at 09:41
  • 1
    @Kjell That's a really bad idea. You're basically transforming an entire object into a string. Imagine if that data would be megabytes big. – Neil John Ramal Sep 30 '15 at 10:25
  • @NeilJohnRamal - well, yep, u r right! Let's see if @Warri can confirm that `games` change after the data has been loaded from firebase. Then it should be straight forward to create the iron-list... – Kjell Sep 30 '15 at 11:52
  • Games doesn't change after I get the data from firebase... – Warri Oct 07 '15 at 09:46

0 Answers0