@vidisha444/featureflags
v0.0.2
Published
*Install in your Angular project using*
Downloads
4
Readme
Installation
Install in your Angular project using
npm i @vidisha444/featureflag
Import in your app.module.ts
import { FeatureflagModule } from 'featureflag';
And in your imports array (where the path of the config.json can be any path of json file even present on the web)
FeatureflagModule.forRoot('./assets/config/config.json')
Eg of config.json file ->
{
"feature1": false,
"feature2": true,
"feature3": false
}
Implementation of Feature Flags in Angular
There can be 2 ways to turn on/off any screen or tile or section
- Through routing
- Through directly not showing the section or tile
- Using Routing
Just add this to any route in your routing path->
canLoad: [FeatureFlagGuard], data: {feature: 'feature1'}
- For sections or tiles
Just add *featureFlag=" 'feature2'"
in any div or section or card.