diff --git a/src/component-loader/component-loader.class.ts b/src/component-loader/component-loader.class.ts index 8f6944d7f9..14597d51d2 100644 --- a/src/component-loader/component-loader.class.ts +++ b/src/component-loader/component-loader.class.ts @@ -205,6 +205,9 @@ export class ComponentLoader { this._viewContainerRef.indexOf(this._contentRef.viewRef) ); } + if (this._contentRef.viewRef) { + this._contentRef.viewRef.destroy(); + } // this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._componentRef.hostView)); // // if (this._contentRef.viewRef && this._viewContainerRef.indexOf(this._contentRef.viewRef) !== -1) {