Skip to content

Instantly share code, notes, and snippets.

@jhubert
Created May 23, 2012 06:54
Show Gist options
  • Save jhubert/2773610 to your computer and use it in GitHub Desktop.
Save jhubert/2773610 to your computer and use it in GitHub Desktop.
Sample Layout of a view with self contained data
SkillRank.Views.DashboardUserLists = Backbone.View.extend
template: JST['dashboard/_user_lists']
initialize: ->
@collection = new SkillRank.Collections.Lists()
@collection.on('reset', @render, this)
@collection.fetch()
render: ->
@$el.html(@template(lists: @collection))
this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment