Skip to content

Instantly share code, notes, and snippets.

@kristianhellquist
Last active December 10, 2015 15:59
Show Gist options
  • Save kristianhellquist/4458317 to your computer and use it in GitHub Desktop.
Save kristianhellquist/4458317 to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment