Share via


Template.render method

Renders a template based on the specified URI (static method).

Syntax

var promise = WinJS.Binding.Template.render(
    href, 
    dataContext, 
    container);

Parameters

  • href
    Type: String

    The URI from which to load the template.

  • 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 is completed after binding has finished. The value is either the object in the container parameter or the created DIV.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Binding

See also

Template