Constructor
new Object(attributes, options)
Creates a new model with defined attributes. A client id (cid) is
automatically generated and assigned for you.
You won't normally call this method directly. It is recommended that
you use a subclass of AV.Object instead, created by calling
extend.
However, if you don't want to use a subclass, or aren't sure which subclass is appropriate, you can use this form:
var object = new AV.Object("ClassName");
That is basically equivalent to:
var MyClass = AV.Object.extend("ClassName");
var object = new MyClass();
Parameters:
| Name | Type | Description |
|---|---|---|
attributes |
Object | The initial set of data to store in the object. |
options |
Object | A set of Backbone-like options for creating the object. The only option currently supported is "collection". |