I made a JSFiddle example for Angular 4 app and when I try to inject ChangeDetectorRef
in Child
component:
public constructor(
private _changeDetectorRef: ChangeDetectorRef) {}
I get error:
Error: Can't resolve all parameters for ChildComponent: (?).
I can't inject any service from "@angular/core"
.
When I delete constructor or ChangeDetectorRef
injection everything works fine.
How can I inject ChangeDetectorRef
in my component?
Thanks
That's a problem with JSFiddle
itself, in stackblitz it works fine.