Xmpp.Views.Contacts ||= {} class Xmpp.Views.Contacts.MeView extends Backbone.View template: JST["backbone/templates/contacts/me"] el: $('#js-me') initialize: () -> _.bindAll(this) @model.on('change', @updateContact, this) updateContact: (me) -> @model = me @render() render: -> contact = @model.toJSON() $(@el).html(@template(contact)) this