public
Last active

  • Download Gist
gistfile1.coffee
CoffeeScript
1 2 3 4 5 6 7 8 9 10 11
MyView = Backbone.View.extend
initialize: ->
@model.on('change', @render, @)
render: ->
@$el.html("whatever...")
@
 
# Somewhere in your backbone-app ...
view = new MyView(model: aModel)
$('#content').append(view.render().el)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.