Conditional Templating


"dom-if" element is used to perform conditional templating


\\Syntax

< template is="dom-if" if="{{userCheck()}}“ restamp>


When the 'if' property becomes true, the template will be displayed and when the 'if' property becomes false, the stamped content is hidden, but not removed from the DOM.
restamp attribute - If the 'restamp' value is true, the elements will be removed from the DOM.When the 'if' becomes true then the elements are re-created and added back to the DOM and when the 'if' property becomes false then the elements are discarded.

Array Selector Element

The array selector element is used to select a particular item from an array.


\\Syntax

< array-selector id="arraySelector" items="{{lfc}}" selected="{{selected}}" multi toggle>

---------------------------------------------

 ‘items’ property -  has an array as a value
 ‘multi’ property - If true, used to select multiple items at once.
 ‘toggle’ property - If true, it identifies the already selected items and deselect that item.
 ‘selected’ property -If true, 'selected' is an array in which any one is selected.If false, it is the currently selected item, or null if no item is selected.





Visit :


Discussion


* You must be logged in to add comment.