Before ng9, I can get the instance by:
Inject the ViewContainerRef in constructor
constructor(private _viewContainerRef: ViewContainerRef) { }
and then get it using
let hostComponent = this._viewContainerRef["_data"].componentView.component;
But in ng9, there is no _data property in ViewContainerRef:
How can I do in ng9? Thanks!
_dataseems to be a private variable on theViewContainerRef, why do you need to access it?