Skip to content

Instantly share code, notes, and snippets.

@orlaqp
Created May 1, 2015 00:34
Show Gist options
  • Save orlaqp/1145c531c8a14dd1f252 to your computer and use it in GitHub Desktop.
Save orlaqp/1145c531c8a14dd1f252 to your computer and use it in GitHub Desktop.
# generate document with data
generatePreview = (content, data, callback) ->
Meteor.call 'generatePreview', content, data, (error, result) ->
callback && callback(error, result)
waitForPreview = Meteor.wrapAsync(generatePreview, this)
waitForPreview currentTemplate, sampleData, (error, result) ->
# at this point is where I need the original context
debugger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment