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 |
|
See also
Build date: 12/5/2012