Created
May 21, 2012 15:15
-
-
Save mlangens/2762862 to your computer and use it in GitHub Desktop.
jquery $.get
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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