IPHistoryModelDirective
Selector
The selector for this directive is:
[ipHistoryModel]
Properties:
ngControl?: NgControl
: The host control element to watch.historyHostDirective?: EmailBuilderHistoryHostDirective
: The history host element.
Methods:
ngOnInit(): void
: Angular lifecycle method. Subscribes to changes on thengControl
value and triggers thedetectChanges
method on thehistoryHostDirective
.ngOnDestroy(): void
: Angular lifecycle method. Cleans up any subscriptions made during the component’s lifecycle.
Usage:
The IPHistoryModelDirective
directive is used to track changes made to a form control and add them to the history manager.
To use the directive, add the [ipHistoryModel]
attribute to the form control element and provide a EmailBuilderHistoryHostDirective
instance to the historyHostDirective
property.
Usage example: