Backbone中的RESTful持久化
1 从服务端获取数据
var BookShelf = Backbone.Collection.extend({ model: Book, url: '/todos' }); var bookshelf = new BookShelf(); bookshelf.fetch();
2 将数据保存到服务端
book.save(); bookshelf.create({title: 'Backbone in Action'});
3 从服务端删除数据
book.destroy();
相关推荐
Chasingsun 2013-05-16
iViOLeTi 2016-01-18
Chydar 2014-07-22
涓涓溪流 2014-07-06
ififg 2014-02-19
芋道源码 2013-07-03
蒲厷渶戀 2013-07-02
Raindan 2013-06-24
Gcalolin 2019-06-25
lancelotlewis 2013-05-16
linkincsdn 2013-05-06
我与大象的故事 2013-04-17
ifconfig 2013-04-15
VitaLemon 2012-12-15
大黑 2019-06-21
汤姆猴 2012-11-12
书弋江山 2012-10-17
Chasingsun 2019-06-20
kiven 2016-05-07