Backbone 1.1.0 Views – Reading Options

If you want to access to passed options – just save them:

initialize: function (options) {
  this.options = options || {};
}

If you use ES6:

initialize (options = {}) {
  this.options = options;
}

If you want to save passed options for all Backbone.View‘s you can override constructor like ncksllvn suggested below.

Leave a Comment

tech