0
votes

I am just learning Polymer by following the steps in this tutorial.

https://www.polymer-project.org/docs/start/tutorial/intro.html

For those of you who have done this, there is a file named "post-list.html". Inside here, there is a block of code that goes like

<post-service id="service" posts="{{posts}}"></post-service>

    <div layout vertical center>
      <template repeat="{{post in posts}}">
        <post-card
          favorite="{{post.favorite}}"
          on-favorite-tap="{{handleFavorite}}"
          hidden?="{{show == 'favorites' && !post.favorite}}">
          <img src="{{post.avatar}}" width="70" height="70">
          <h2>{{post.username}}</h2>
          <p>{{post.text}}</p>
        </post-card>
      </template>
    </div>

As you can see "posts" is the actual contents of the individual post cards. Where is this coming from? No where in the tutorial can I find those strings of the post card contents but something is definitely populating them in the post cards.

1

1 Answers

0
votes

Just took a quick look & appears the "post-service" element implementation is not covered but it's included in the starter project you can download. It's mentioned in the 2nd paragraph here - https://www.polymer-project.org/docs/start/tutorial/step-3.html