Blaze.renderWithData

Client

Blaze.renderWithData(templateOrView, data, parentNode, [nextNode], [parentView])

import { Blaze } from 'meteor/blaze' Source

Renders a template or View to DOM nodes with a data context. Otherwise identical to Blaze.render.

Arguments

templateOrView Blaze.Template or Blaze.View

The template (e.g. Template.myTemplate) or View object to render.

data Object or Function

The data context to use, or a function returning a data context. If a function is provided, it will be reactively re-run.

parentNode DOM Node

The node that will be the parent of the rendered template. It must be an Element node.

nextNode DOM Node

Optional. If provided, must be a child of parentNode; the template will be inserted before this node. If not provided, the template will be inserted as the last child of parentNode.

parentView Blaze.View

Optional. If provided, it will be set as the rendered View's parentView.

doc_Meteor
2016-05-29 17:18:00
Comments
Leave a Comment

Please login to continue.