This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Appointment = Backbone.Model.extend({}); | |
var appointment = new Appointment(); | |
appointment.set('title', 'My knee hurts'); | |
var AppointmentView = Backbone.View.extend({ | |
tagName: 'ul', | |
render: function(){ | |
$(this.el).html('<li>' + this.model.get('title') + '</li>'); | |
} | |
}); | |
var appointmentView = new AppointmentView({model: appointment}); |