Let's say I have an object having one property called text. The property is passed into the editor using [text]="object.property". When some changes are present and the editor is destroyed or it loses focus, it emits the changeSave output / event. The parent component then saves the content. The problem is that editor can be focused and simultaneously have some changes, but since the editor has the focus, the changes are not saved yet. But what in case that the editor is destroyed? The blur would not get called and emitting events in ngOnDestroy does not work.
Wouldn't it be a bad idea to implement in Angular something like ngBeforeDestroy, so that events emitted in this method would be truly emitted?
Let's say I have an object having one property called
text. The property is passed into the editor using[text]="object.property". When some changes are present and the editor is destroyed or it loses focus, it emits the changeSave output / event. The parent component then saves the content. The problem is that editor can be focused and simultaneously have some changes, but since the editor has the focus, the changes are not saved yet. But what in case that the editor is destroyed? The blur would not get called and emitting events in ngOnDestroy does not work.Wouldn't it be a bad idea to implement in Angular something like ngBeforeDestroy, so that events emitted in this method would be truly emitted?