Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
112 lines (73 sloc) 3.08 KB


Featureflow Angular 2+ Module

This is currently under development.

Get your Featureflow account at

Get Started

The easiest way to get started is to follow the Featureflow quick start guides

Change Log

Please see CHANGELOG.


Using NPM

$ npm install --save featureflow-angular


Adding Featureflow

import {FeatureflowService} from "./featureflow.service";

Evaluate a feature

import Featureflow from 'featureflow-angular';
Realtime events and EventSource

Featureflow uses EventSource for realtime streaming of feature updates. If you wish to target a browser that doesn't natively support EventSource, we recommend using a polyfill such as this one.

You can either require/include the polyfill in your application,

//for example
import 'event-source-polyfill';

Quick start

Get your environment's Featureflow Javascript API key and initialise a new Featureflow client

var FF_JS_API_KEY = '<Your javascript api key goes here> (The key beginning js-env-)';
var featureflow = Featureflow.init(FF_JS_API_KEY);

This will load the value of each feature for the current environment specified by the api key. These values can be toggled on and off at https://<your-org-key>

Note: You are responsible for passing the featureflow client instance around your application

In your code, you can test the value of your feature where the value of my-feature-key is equal to 'on'

  if (featureflow.evaluate('my-feature-key').is('on')){
    // this feature code will be run because 'my-feature-key' is set to 'on'

Because the default variants for any feature are 'on' and 'off', we have provided two helper methods .isOn() and .isOff()

  // this feature code will be run because 'my-feature-key' is set to 'on'

  // this feature code won't be run because 'my-feature-key' is not set to 'off'

Further documentation can be found here For the full Javascript API Specification see [here] (


  • basic wrapper




This repository also includes a demo app. To run the demo:

  • Requires: node >= 8 nvm install 8
  • Install the latest angular cli npm install -g @angular/cli
  • Set your JS Key in featureflow.component.ts
  • Install dependencies: npm install
  • Start the demo ng serve
You can’t perform that action at this time.