Windows Dev Center

Template.render method

Applies to Windows and Windows Phone

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 supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Binding

Library

Winjs.js

See also

Template

 

 

Show:
© 2015 Microsoft