Skip to content

Instantly share code, notes, and snippets.

@TimVosch
Created December 22, 2019 19:13
Show Gist options
  • Save TimVosch/8836d1f2b510f00c6ebca32b3c184240 to your computer and use it in GitHub Desktop.
Save TimVosch/8836d1f2b510f00c6ebca32b3c184240 to your computer and use it in GitHub Desktop.
Service nesting and dependencies
/**
* Load internal services
*/
loadServices(): void {
this.sourceTypeService = new SourceTypeService(this.sourceTypeRepo);
this.deviceTypeService = new DeviceTypeService(this.deviceTypeRepo);
this.locationService = new LocationService(this.locationRepo);
//
this.sourceService = new SourceService(
this.sourceRepo,
this.sourceTypeService,
);
//
this.deviceService = new DeviceService(
this.deviceRepo,
this.deviceTypeService,
this.sourceService,
this.locationService
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment