Interface IHtmlConfig
Provides properties for the html
widget.
You can use these properties in params of the AuWidgetHtml class.
{
"widgets": [
{
"name": "data-based",
"type": "html",
"title": "HTML with data",
"params": {
"data": [
{
"title": "Color",
"value": "Space Gray"
},
{
"title": "Shape",
"value": "Rounded Rect"
}
],
"template": {
"<>": "div",
"html": [
{
"<>": "span",
"text": "${title}: ",
"style": "font-weight: bold"
},
{
"<>": "span",
"text": "${value}"
}
]
}
}
}
]
}
This will result in:
<div>
<span style="font-weight: bold">Color: </span>
<span>Space Gray</span>
</div>
<div>
<span style="font-weight: bold">Shape: </span>
<span>Rounded Rect</span>
</div>
Package: ui-framework
Properties
data
The content to display.
Declaration
data?: Array<any> | any
Property Value
Type | Description |
---|---|
Array<any> | any | The content to display. |
template
A markup template to format the content.
Declaration
template: Array<ITemplateConfig> | ITemplateConfig
Property Value
Type | Description |
---|---|
Array<ITemplateConfig> | ITemplateConfig | A markup template to format the content. |