For the complete documentation index, see llms.txt. This page is also available as Markdown.

OpenFeature Provider for Angular

Integrate OpenFeature with Harness FME in your Angular applications to evaluate feature flags, manage contexts, and track events using a standardized SDK.

Integrate your Angular applications with Harness FME using the Angular OpenFeature Provider, a standardized, vendor-agnostic feature flagging API. This provider implements the OpenFeature specification and bridges the OpenFeature SDK with the Harness FME Browser SDK.

This page walks you through installing, configuring, and using the Angular OpenFeature provider to evaluate feature flags in your Angular applications.

Before you begin

Before you begin, ensure you have the following:

  • A valid Harness FME SDK key for your project

  • An Angular 14+ project

  • Access to your project's package.json file to add the provider dependency

Version compatibility

Component
Minimum Version

Angular

≥ 14

@splitsoftware/openfeature-web-split-provider

≥ 1.0.0

Harness FME Browser SDK

≥ 10.x

OpenFeature Angular SDK

≥ 0.1.0

Install the provider and dependencies

Add the Harness FME OpenFeature provider dependency to your project's package.json file.

npm i @openfeature/angular-sdk @splitsoftware/splitio-browserjs @splitsoftware/openfeature-web-split-provider

Initialize the provider

The Harness FME OpenFeature provider requires your Harness FME Browser SDK key and a targeting key.

If you are using a traditional NgModule setup:

If you are using a standalone bootstrap (Angular 16 or later):

Evaluate feature flags

Use the FeatureFlagService (which is shown as splitService in this example) to evaluate flags through the OpenFeature provider. Specify the feature flag key and a default value in the evaluation method to ensure predictable behavior while the flag resolves.

For more information, go to the Harness FME Web OpenFeature Provider GitHub repository.

Last updated

Was this helpful?