featureflow-ng

1.3.3 • Public • Published

featureflow-ng

Featureflow NG Angular 1 Provider

Get your Featureflow account at featureflow.io

Get Started

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

Change Log

Please see CHANGELOG.

Installation

Using NPM

$ npm install --save featureflow-ng

Using bower

$ bower install featureflow-ng

Usage

Adding Featureflow

Webpack

If you are using webpack, you can require the code using

var FeatureflowProvider = require('featureflow-ng');

or using es6 syntax

import FeatureflowProvider from 'featureflow-ng';
Bower

Install both the featureflow-client and featureflow-ng components.

$ bower install featureflow-client
$ bower install featureflow-ng

Include the following script in HTML file. This will expose the global variable FeatureflowProvider. You must also include the bower featureflow-client script.

<script crossorigin="anonymous" src="bower_components/featureflow-client/dist/featureflow.min.js"></script>
<script crossorigin="anonymous" src="bower_components/featureflow-ng/dist/featureflow-ng.min.js"></script>

Note: It is recommended to use build tools to manage your bower dependencies. Please see the bower website for more details.

CDN

Include the following script in HTML file. This will expose the global variable Featureflow

<script crossorigin="anonymous" src="https://cdn.featureflow.io/featureflow.js"></script>
<script crossorigin="anonymous" src="https://cdn.featureflow.io/featureflow-ng.js"></script>

This plugin will expose the entire featureflow client interface.

Getting Started

Add the ng-featureflow to your app.module and initialize it in your config.

var FF_API_KEY = '<js-featureflow-key>';
 
angular.module('sampleApp', ['ng-featureflow'])
.config(['featureflowProvider', function(featureflowProvider) {
        featureflowProvider.init(FF_API_KEY, {});
}]);

Access the featureflow client instance using the following code in your controller.

angular.module('sampleApp')
.controller('ExampleController', function(featureflow) {
        //user featureflow like you would the normal client
        if (featureflow.evaluate('my-key').isOn()){
          //do something
        }
});

Please see the featureflow-javascript-sdk for further details about how to use the featureflow instance.

Roadmap

  • Write documentation
  • Release to npm
  • Release to bower
  • Automate release to bower on npm prepublish
  • Automate release script to cdn on npm prepublish

License

Apache-2.0

Package Sidebar

Install

npm i featureflow-ng

Weekly Downloads

1

Version

1.3.3

License

Apache-2.0

Unpacked Size

74.4 kB

Total Files

16

Last publish

Collaborators

  • oliverfeatureflow