Someone is explaining to me {{> player}}
Working on examples of meteors and basically getting all over the place. I'm also new to steering games and just trying to wrap my head around. In the example of the leaders in the meteor. What's going on in this piece of code:
<div class="leaderboard">
{{#each players}}
{{> player}}
{{/each}}
</div>
In particular, I am confused by {{> player}}. Why can't I just {{player}}? What is {{> player}} doing?
source to share
{{> player }}
calls partial with a name player
. As mentioned in this site
Particles come in handy when you have a piece of Handlebars.js template that needs to be used in multiple contexts.
While it {{player}}
is a placeholder for the value, you will go to the template to be displayed.
In jsfiddle, I created a sample code .
source to share