Skip to content

Instantly share code, notes, and snippets.

@bgando
Forked from codeschool-courses/challenge-1-7.js
Last active December 18, 2015 04:39
Show Gist options
  • Save bgando/5726624 to your computer and use it in GitHub Desktop.
Save bgando/5726624 to your computer and use it in GitHub Desktop.
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});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment