Usage
Signature:
interface BindDomElement<D>
Generic Parameters
Parameter Description D Type of data to be provided to the view
Typescript Import Format
//To typecheck the element APIs, import as below.
import { BindDomElement } from "ojs/ojbinddom";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojbinddom";
For additional information visit:
Attributes
-
config :(oj.ojBindDom.Config.<D>|Promise.<oj.ojBindDom.Config.<D>>)
-
Configuration object that defines HTML content to be inserted into the DOM and data to use when applying bindings to this content. The configuration object can be specified either directly or via a Promise.
Type Definitions
-
Config<D>
-
Properties:
Name Type Description data
D The data available to the view when expressions are evaluated. Note that the oj-bind-dom element's binding context will not be made available. view
Array.<Node> The Nodes to be inserted. Note that oj-bind-dom does not clone the node array before applying bindings to it. If the application needs to have access to the original node array, it should set the 'view' property to a cloned copy. Node arrays should not have a longer lifespan than their oj-bind-dom element as would be the case for a node array created in the application model and referenced by an oj-bind-dom element that is detached and reattached by another binding element or script.