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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -