Skip to content

Instantly share code, notes, and snippets.

@e-oz
Created September 20, 2022 12:29
Show Gist options
  • Save e-oz/321593272f77a6f39e2cfd64b6569b33 to your computer and use it in GitHub Desktop.
Save e-oz/321593272f77a6f39e2cfd64b6569b33 to your computer and use it in GitHub Desktop.
class UploaderConfig {
public readonly url: string;
}
// Service, where you need UploaderConfig
class ApiService {
constructor(@Inject('UPLOADER_CONFIG') config: UploaderConfig){
}
}
// Module or component where you can configure dependencies:
// ...
providers: [{
provide: 'UPLOADER_CONFIG',
useValue: {url: environment.API.uploader}
}]
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment