See for example this line:
constructor(private elementRef: ElementRef, private zone: NgZone) {}
I need to remove the parmas from the constructor in order for the downgrade to work with no error. Else I get
(SystemJS) Can't resolve all parameters for (?)
So I found a way to remove element ref with:
@ViewChild('myname') divElementRef:ElementRef;
But I don't find any solution how to declare the NgZone, I always get it is undefined and I can do "run" with it. If someone know how I can create instance of ngZone outside the constructor it will help, or may explain the error I get while downgrade componenet.
Are the constructor params should be part ot the input I declare while downgrade a component?
angular.module('myModule').directive('myLabel', downgradeComponent({component: MyLabelComponent, inputs: ['text'] }) as angular.IDirectiveFactory)
if the constructor of MyLableComponent look like this:
constructor(private elementRef: ElementRef) {}
I will get the error message. Hope someone can explain why. While removing the constructor parmas everything will work fine.