growthbook-remote-config
v0.0.5
Published
This library is meant for use with [Angular](https://angular.io/)
Downloads
7
Readme
Growthbook Remote Config (for Angular)
This library is meant for use with Angular
Before using this library, you need to sign up for an account at growthbook.io, or host it yourself.
The cloud variant (signing up at growthbook.io) is free up to 5 seats, quite attractive for a startup, especially you want something powerful to do remote configuration, including:
- Remote Configuration (replacing text)
- Feature Flags (boolean switches)
- A/B Test (matching variation string keys)
- Percentage Rollout (percentage of boolean switches)
Creating API Key
Follow the instruction here to create an API Key.
Installation
Install the module with npm
or yarn
npm i growthbook-remote-config
Initialize this remote config module with the API key retrieved from above
// Import this module
import { GrowthbookRemoteConfigModule } from 'growthbook-remote-config';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
// Initialize the module before using it
GrowthbookRemoteConfigModule.forRoot({
apiKey: '** API Key from GrowthBook **',
}),
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Note that there are two configuration options for this module
Only apiKey
is a mandatory field. Replace featuresEndpoint
only if you are self-hosting.
GrowthbookRemoteConfigModule.forRoot({
// API Key
apiKey: '** API Key from GrowthBook **',
// Optional endpoint parameter.
// Defaults to 'https://cdn.growthbook.io/api/features'
featuresEndpoint: '',
}),
Documentation
See more on the usage of the module here
Release
See more on instructions to release package here