ToBodyStructurePipe
Methods
transform()
The transform()
method takes an IStructure
object as input and returns its type (TStructureTypes
).
Parameters:
structure
: TheIStructure
object to transform.
Returns:
- The type of the structure (
TStructureTypes
).
Usage
In the above example, structures
is an array of IStructure
objects.
The toBodyStructure
pipe transforms each IStructure
object to its corresponding TStructureTypes
, which is then set as the [cdkDragData]
attribute of the div
element.