Skip to content

Instantly share code, notes, and snippets.

@mxriverlynn
Created March 20, 2012 04:17
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 mxriverlynn/2131284 to your computer and use it in GitHub Desktop.
Save mxriverlynn/2131284 to your computer and use it in GitHub Desktop.
when/then
var that = this;
var templateRetrieved = this.getTemplate();
$.when(templateRetrieved).then(function(template){
var html = that.renderTemplate(template, data);
that.$el.html(html);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment