Template.render method

1 out of 2 rated this helpful - Rate this topic

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

Syntax


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

Parameters

dataContext

Type: object

The object to use for default data binding. Each element (or one of its children) may contain a data-win-bindsource attribute that overrides dataContext.

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

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Namespace

WinJS.Binding

Library

Base.js

See also

Template

 

 

Build date: 12/5/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.