node.js - Pulling items from a collection using Handlebars -


i using node.js express , mongodb database utilizing mongoose , handlebars templating engine. have collection in database named players. have defined model, player.js, provides schema collection. when user enters players information gets stored database correctly. trying create list show playername , team on players homepage every player gets created. code have been trying write in handlebars:

<div class="widget">     <ul>         {{#each players}}             <li><a href="#">{{playername}},  {{team}}</a></li>         {{/each}}     </ul> </div> 

can me understand how access each of items in question?


Comments

Popular posts from this blog

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World