这就是我所看到的渲染结果:[object Object]
我需要修改什么?
我的档案:
的layout.html
<template name="layout">
<div class="container">
<div class="row">
{{yield}}
</div>
</div>
</template>
post_page.html
<template name="postPage">
<div class="sidebar col-md-4">
{{#each posts}}
{{> postItem}}
{{/each}}
<a class="save-all" href="javascript:;"><span class="glyphicon glyphicon glyphicon-save"></span></a>
</div>
<div class="mainbar col-md-12">
{{> postSubmit}}
</div>
</template>
post_page.coffee
Template.postPage.helpers posts: ->
Posts.find {},
sort:
position: 1
routes.coffee
Router.configure layoutTemplate: "layout"
Router.map ->
@route "home",
path: "/"
template: "home"
@route "postPage",
path: "/posts/:_id"
data: ->
Posts.findOne @params._id
post.coffee
@Posts = new Meteor.Collection "posts"