IPEmailBuilderStructuresDirective
Selector
The selector for this directive is:
[ipEmailBuilderStructures]
Properties
data: IStructure[]
: An input property to pass an array ofIStructure
objects.minHeight: number
: A readonly property that sets the minimum height of the directive element to 100%.dropListCollection: Map<CdkDropList, string>
: A getter property that returns a map of all theCdkDropList
instances of the directive element.
Methods
dropListDropped(event: CdkDragDrop<IStructure[], IStructure[], TStructureTypes>): void
: A method that is triggered when a structure is dragged and dropped onto theCdkDropList
. It moves the item to a new position in the array of structures or creates a new structure if it is not dropped onto an existing one.
Usage
Usage example:
In the above example, the ipEmailBuilderStructures
directive is attached to a div
element and passed an array of IStructure
objects using the data
input property.
The structures are displayed using an ngFor
loop. The dropListDropped
method is called when a structure is dragged and dropped onto the div
element.