Tuesday, April 17, 2012

Backbone Basic

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('
  • ' + this.model.get('title') + '
  • '); } }); var appointmentView = new AppointmentView({model: appointment}); appointmentView; appointmentView.render() $('#app').html(appointmentView.el);

    3 comments:

    1. The exodus of manufacturing apparel and accessories off shore has led towards the Chinese Fashion crumbling of your domestic factories.

      ReplyDelete
    2. Hey guys, how you going? I have something wonderful to share with you. A reliable online store is launching promotional activities now. You can buy wow gold with cheap price and fast delivery speed there. WoW power leveling is also available. Is that amazing? Guys,seize the opportunity.

      ReplyDelete
    3. The exodus of manufacturing apparel and accessories off shore has led towards the Diablo 3 Gold crumbling of Buy Diablo 3 Gold.

      ReplyDelete