Created
September 20, 2022 12:29
-
-
Save e-oz/321593272f77a6f39e2cfd64b6569b33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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