Last active
August 29, 2015 13:58
-
-
Save marioblas/9956356 to your computer and use it in GitHub Desktop.
Meteor 0.8.0 (blaze) - Inserting some reactive Meteor UI content into an existing document
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
/** | |
* Inserting some reactive Meteor UI content into an existing document. | |
* | |
* UI.render instantiates a template and UI.insert adds it as a child of some element in the DOM. | |
* UI.renderWithData is like UI.render which also sets the data context. | |
*/ | |
UI.insert(UI.render(Template.foo), document.body); | |
UI.insert(UI.renderWithData(Template.foo, {bar: "baz"}), document.body); | |
UI.insert(UI.render(Template.bar), parentNode, beforeNode); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment