【发布时间】:2016-01-09 02:03:06
【问题描述】:
我不明白为什么在每个子句周围添加模板“simple-todos”后它们不起作用?!
<template name="simple-todos">
<head>
<title>Todo List</title>
</head>
<body>
<div class="row">
<header>
<h1>Todo List</h1>
{{> addObjects}}
</header>
<ul>
{{#each tasks}}
{{> task}}
{{/each}}
</ul>
</div>
</body>
</template>
<template name="task">
<li class="{{#if checked}}checked{{/if}}">
<button class="delete">×</button>
<input type="checkbox" checked="{{checked}}" class="toggle-checked" />
<span class="text">{{text}}</span>
<span class="text">{{createdAt}}</span>
</li>
</template>
当我不使用模板名称“simple-todos”时,我直接成为数据库中的值...
感谢您的帮助...
【问题讨论】: