There may be situations when you would want to duplicate a component on a page for usability and it would be
a pain to declare and configure this component for every occurance on the page. For this reason there is a way
to copy the component declaration.
![[Note]](common-images/note.png) | Note |
|---|
| Component declarations can only be copied in the specification. |
...
<component id="originalComponentId" ... >
...
</component>
...
<component id="newId" copy-of="orignalComponentId" />
... |
|
This is the original component declaration with bindings and other configuration.
|
|
This is a new component in the container with a new id, but its type and configuration is copied from the
original component declaration. The copy-of attribute specifies the
id of the original component. ![[Caution]](common-images/caution.png) | Caution |
|---|
| A component declaration can specify either
the copy-of or the type, but not both. |
|