JavaScript 的 MVC 框架,Backbone.js 1.2.2 发布

jopen 9年前

Backbone.js 是一种重量级javascript  MVC 应用框架,通过Models进行key-value绑定及custom事件处理,通过Collections提供一套丰富的API用于枚举功能,通过 Views来进行事件处理及与现有的Application通过RESTful JSON接口进行交互.

Backbone.js 1.2.2 发布,此版本更新内容如下:

  • Collection methods find, filter, reject, every, some, and partition can now take a model-attributes-style predicate:  this.collection.reject({user: 'guybrush'}).

  • Backbone Events once again supports multiple-event maps (obj.on({'error change': action})). This was a previously undocumented feature inadvertently removed in 1.2.0.

  • Added Collection#includes as an alias of Collection#contains and as a replacement for Collection#include in Underscore.js >= 1.8.

下载: