ToHistoryOptionsPipe
The toHistoryOptions pipe is used to transform the current component options and send them to the [ipEmailBuilderHistoryHost] directive.
This method transforms a given component into an object with a
cmp
property and a watch
property.Parameters:
cmp
— The component to transform. It can be of typeAIPEmailBuilderBlock
,AIPStructure
, orAIPEmailBody
.
Returns:
- An object of type
IIPOptionsHistoryContext<Record<string, any>>
with thecmp
property set to the given component and thewatch
property set to an empty object.
Here's an example:
<my-component [ipEmailBuilderHistoryHost]="myComponent | toHistoryOptions"></my-component>
To use the
toHistoryOptions
pipe, simply apply it to your component and bind the output to the ipEmailBuilderHistoryHost
directive.
Last modified 4mo ago