Angular Suite Feature
Install
npm install --save angular-suite-feature
Usage
require('angular-suite-feature')(angular);
var myApp = angular
.module('your-app', ['suiteFeature'])
.config(['featureProvider', (featureProvider) => {
featureProvider.setFeatures(['dummy', 'otherDummy']);
}]);
Service
myApp.controller('GreetingController', ['$scope', 'feature', function($scope, feature) {
$scope.reload = function() {
if (feature.isOn('yourFeatureName')) {
} else {
}
};
$scope.someThing = function() {
if (feature.isOff('yourFeatureName')) {
} else {
}
};
}]);
Filter
.div(ng-show="{{ 'self_service_dashboard_ignore_revenue' | featureIsOn }}")
| feature is On
.div(ng-show="{{ 'self_service_dashboard_ignore_revenue' | featureIsOff }}")
| feature is Off