Skip to content

Instantly share code, notes, and snippets.

@mlangens
Created May 21, 2012 15:15
Show Gist options
  • Save mlangens/2762862 to your computer and use it in GitHub Desktop.
Save mlangens/2762862 to your computer and use it in GitHub Desktop.
jquery $.get
Backbone.View.extend({
template: 'my-view-template',
render: function(){
var that = this;
$.get("/templates/" + this.template + ".html", function(template){
var html = $(template).tmpl();
that.$el.html(html);
});
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment