Backbone.js Tutorial - 11 - Introduction to Collections (ok)

C:\Users\Administrator\Desktop\gulp\app.js
StudentModel = Backbone.Model.extend({
defaults: {
name: "unknown"
}
});
StudientCollection = Backbone.Collection.extend({
model: StudentModel
});
jQuery(document).ready(function($) {
var jony = new StudentModel();
var vicky = new StudentModel();
var classones = new StudientCollection([jony, vicky]);
console.log(classones);
console.log(classones.size());
});
PreviousBackbone.js Tutorial - 10 - (Views) Events (ok)NextBackbone.js Tutorial - 12 - (Collections) Adding and Removing Elements (ok)
Last updated
Was this helpful?