@Component({
selector: 'app-entity-details',
templateUrl: './entity-details.component.html',
styleUrls: ['./entity-details.component.scss'],
viewProviders: [{
provide: ControlContainer,
useFactory: (container: ControlContainer) => container,
deps: [[new SkipSelf(), ControlContainer]],
}]
})
export class EntityDetailsComponent{
I have found the above setup using viewProviders on my Component as a way to use nested Formgroups within nestes Components without manually handling those as Input and/or output. Now I am trying to figure out how to setup my test environment in the spec files.
Currently I obviously get a "No provider found for 'ControlContainer'" error. Configuring the TestingModule to provide the exact same thing I use about or even a generic ControlContainer does not yield any results. Do I have to mock a new Component that uses my EntityDetailsComponent
?
I am thankful for any sources that might help.