编码:
var Appointment = Backbone.Model.extend({});
var appointment = new Appointment();
appointment.set('title', 'My knee hurts');
var AppointmentView = Backbone.View.extend({
render: function(){
$(this.el).html('<li>' + this.model.get('title') + '</li>');
}
});
关于这个的问题: $(this.el)... 看起来“this”是“window”对象而不是事件对象?
如果你能深入解释它是如何工作的,请。
谢谢,约瑟夫