Ember.js 应用开发:从笔记应用到核心绑定机制
1. 笔记应用的完善:删除笔记功能实现
在开发笔记应用时,完成笔记更新功能后,接下来要实现删除笔记的功能。这一功能的实现步骤如下:
- 添加删除按钮 :在笔记模板中添加删除按钮,代码如下:
<script type="text/x-handlebars" id="notes">
<div id="notes" class="azureBlueBackground azureBlueBorderThin">
{
{input valueBinding="newNoteName"}}
<button class="btn btn-default btn-xs"
{
{action "createNewNote"}}>
New Note
</button>
<div class="list-group" style="margin-top: 10px;">
{
{#each controller}}
{
{#linkTo "notes.note" this class="list-group-item"}}
{
{name}}
<b
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



