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);

    4 comments:

    1. To see Cheap WOW Gold and Buy Runescape Goldworld in a granda of stand.And a heaven in a wild flower.Hold infinity in the palm your hand and eternity in an hour.

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

      ReplyDelete
    3. 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
    4. The exodus of manufacturing apparel and accessories off shore has led towards the Diablo 3 Gold crumbling of Buy Diablo 3 Gold.

      ReplyDelete