Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Backbone.js collection.create()

.create() makes a new instance of the model in the Collection.

     var CollectionDemo = Backbone.Collection.extend({  
           model : ModelDemo   //The model 'ModelDemo' is specified by overriding the 'model' property  
        });  
  
  
  
     var collectiondemo = new CollectionDemo();  
              collectiondemo.create({  
                 Name:"John Smith",  
                 Country:"Mars"  
              });  
           }  
        });  
Source by # #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+5 =