Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.
/ NgxConfigModule Public archive

Provides Angular module to load the application configuration.

License

Notifications You must be signed in to change notification settings

KEIII/NgxConfigModule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NgxConfigModule

Provides Angular module to load the application configuration.

Setup

Setup with build-in url loader:

@NgModule({
  imports: [
    HttpClientModule,
    ConfigModule.withUrl(string),
  ]
})
export class AppModule {}

Or setup with custom loader what implements ConfigLoaderInterface

@NgModule({
  imports: [
    ConfigModule.withLoader({provide: APP_CONFIG_LOADER, ...}),
  ]
})
export class AppModule {}

Now you can inject the ConfigService service into your components or services:

@Injectable()
class Service {
  constructor(configService: ConfigService<AwesomeConfig>) {
    const config: AwesomeConfig = configService.get();
    this.stuff = config.stuff;
  }
}

About

Provides Angular module to load the application configuration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published