Backbone 速查表
绑定事件 .on('event', callback) .on('event', callback, context) .on({ 'event1': callback, 'event2': callback }) .on('all', callback) .once('event', callback) // 添加只执行一次的自定义事件 解绑事件 object.off('change', onChange) // just the `onChange` callback object.off('change') // all 'change' callbacks object.off(null, onChange) // `onChange` callback for all events object.off(null, null, context) // all callbacks for `context` all events object.off() // all 事件 object.trigger('event') view.listenTo(object, event, callback) view.stopListening() 事件列表 Collection: add (model, collection, options) remove (model, collection, options) reset (collection, options) sort (collection, options) Model: change (model, options) change:[attr] (model, value, options) destroy (model, collection, options) error (model, xhr, options) Model and collection: request (model, xhr, options) sync (model, resp, options) Router: route:[name] (params) route (router, route, params) 视图 定义视图 // All attributes are