Template.render method

Binds values from the specified data context to elements that are descendants of the specified root element that have the declarative binding attributes specified (data-win-bind).

Syntax

template.render(dataContext, container).done( /* Your success and error handlers */ );

Parameters

  • dataContext
    Type: object

    The object to use for default data binding.

  • container
    Type: DOMElement

    The element to which to add this rendered template. If this parameter is omitted, a new DIV is created.

Return value

Type: Promise

A Promise that will be completed after binding has finished. The value is either container or the created DIV. promise that is completed after binding has finished.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Binding

See also

Template