app.Todo = Backbone.Model.extend({
defaults: {
title: '',
}
});
// renders the full list of todo items calling TodoView for each one.
app.AppView = Backbone.View.extend({
el: '#todoapp',
initialize: function () {
this.$el.html(this.model.get("title"));
}
});
//--------------
// Initializers
//--------------
var first = new app.Todo();
first.set("title", "HELLO WORLD");
console.log(test.get("title"));
app.appView = new app.AppView({model: first});