Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kristianhellquist
Last active December 10, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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