open-index/open-npm huggingface dataset:
npm package: @pl4yzonellc/valar-ui
Description: Angular component library for the Valar Configuration Service.
Latest version: 1.0.6

# Valar UI

Angular component library for the Valar Configuration Service.

## Code scaffolding

Run `ng generate component component-name --project valar-ui` to generate a new component. You can also
use `ng generate directive|pipe|service|class|guard|interface|enum|module --project valar-ui`.
> Note: Don't forget to add `--project valar-ui` or else it will be added to the default project in your
`angular.json` file.

## Build

Run `ng build valar-ui` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build valar-ui`, go to the dist folder
`cd dist/valar-ui` and run `npm publish`.

## Running unit tests

Run `ng test valar-ui` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Feature Flags Tenant Flow

`FeatureFlagsModule.forRoot(...)` configures API host/version and root tenant header only.

```ts
FeatureFlagsModule.forRoot({
  apiBaseUrl: 'https://api.example.com',
  apiVersion: 'v1',
  rootTenantId: environment.tenantId,
});
```

Runtime tenant selection is provided by the consuming app via component Input/Output:

```html
<valar-feature-flags-manager [(tenantId)]="selectedTenantId"></valar-feature-flags-manager>
```

- `tenantId` input is used for API paths like `/v1/feature-flags/tenant_<tenantId>`.
- `tenantId` is also included in PUT payload as `tenant_<tenantId>`.
- `rootTenantId` from `forRoot` is sent as the `x-tenant-id` header.

## Further help

To get more help on the Angular CLI use `ng help` or go check out
the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.