Package Exports
- @rxap/config
- @rxap/config/package.json
Readme
@rxap/config
Simple config file manager for angular applications.
Installation
ng add @rxap/configSetup the package @rxap/config for the workspace.
Get started
Update the angular application main.ts to support @rxap/config.
// (optional) Defines a list of configuration urls.
ConfigService.Urls = ['/config/config.json'];
// Ensures that the configuration is loaded before the angular application is started
Promise.all([ConfigService.Load()]).then(() =>
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err))
);
Schematics
ng-add
Setup the package @rxap/config for the workspace.
ng g @rxap/config:ng-add| Option | Type | Default | Description |
|---|---|---|---|
| project | string | The project where the environment feature should be added |
side-load
Add a side load config to the project main file.
ng g @rxap/config:side-load| Option | Type | Default | Description |
|---|---|---|---|
| project | string | The project name | |
| url | string | Url for the config that should be side loaded | |
| propertyPath | string | Property path where the config should be added | |
| required | boolean | false |
| Required |
|---|
| project |
| url |
| propertyPath |