<editor (onFocus)="onFocus()" #editor *ngIf="configData" [init]="configData" [formControl]="editorControl" (onChange)="contentChange($event)">
</editor>
@ViewChild('editor') myEditor;
ngOnChanges() {
if(!this.currentTab) {
this.myEditor.editor.remove();
} else {
// reinitialize editor here..
}
}
this.myEditor是此处的编辑器参考,有助于删除编辑器。如何用于重新初始化