backbone.js Model

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


  • var MyModel = Backbone.Model.extend(properties, [classProperties]); // Create a custom model
  • var model = new Backbone.Model([attributes], [options]); // Instanciate a model object


propertiesInstance properties.
classPropertiesOptional. Properties that exist and are shared with every model instance of this type.
attributesOptional. Initial values of the model's attributes. If this parameter is left out, the model will be initialized with the values specified by the model's defaults property.
optionsOptional. Object which serves to configure the model and is then passed to the initialize function.

Got any backbone.js Question?