Angular2 FeatureToggle


Your module to handle with feature toggles in Angular2 applications easier.
Instalation and usage
Install angular2-feature-toggle
module as a project dependency.
$ npm install --save angular2-feature-toggle
After that you just need to import the FeatureToggleModule
into your application and the directive will be accessible in your application.
import { FeatureToggleModule } from 'angular2-feature-toggle';
...
@NgModule({
...
imports: [ FeatureToggleModule ],
...
})
...
<div *featureToggle="true">
condition is true and `featureToggle` is enabled.
</div>
<div *featureToggle="false">
condition is false and `featureToggle` is disabled.
</div>
Running unit tests
Run npm test
to execute the unit tests via Karma.
Running the build
Run npm run build
How to contribute
This package is using the AngularJS commit messages as default way to contribute with commitizen
node package integrated in this repository. If you are not so familiar with the Angular projeto commit messages standard, please commit your contribution using:
$ npm run commit
Live example
https://plnkr.co/edit/RepjOclLXM32YbCgC4vv
Author
Wilson Mendes (willmendesneto)