coffeescript - Why Does Meteor Spacebars #each Tag Not Render Content? -
the {{name}} in below html not inject page when should "hello world". have tried remove {{name}} , put in simple "blah blah blah". page not show text.
one error getting is: :1039:17: #each requires argument (compiling raffler.html)
raffler.html
<head> <title>raffler</title> </head> <body> <div id="container">{{> raffle}}</div> </body> <template name="raffle"> <h1>raffler</h1> <ul id="entries"> {{#each entries}} <li> {{name}} </li> {{/each}} </ul> </template>
raffler.coffee
if meteor.is_client template.raffle.entries = [{name: "hello world"}]
also working off of tutorial: http://railscasts.com/episodes/351-a-look-at-meteor
your code looks fine, maybe missed </template>
, try this:
if meteor.is_client template.raffle.entries = -> [name: "hello world"]
again not sure if it'll code looks quite ok
Comments
Post a Comment