Browse Source

Add Method that is retur value of GlobalFeatures

pull/12660/head
Mahmut Gundogdu 4 years ago
parent
commit
33319c243c
  1. 9
      npm/ng-packs/packages/core/src/lib/services/config-state.service.ts

9
npm/ng-packs/packages/core/src/lib/services/config-state.service.ts

@ -139,13 +139,20 @@ export class ConfigStateService {
);
}
getGlobalFeatures() {
return this.store.state.globalFeatures;
}
getGlobalFeatures$() {
return this.store.sliceState(state => state.globalFeatures);
}
getGlobalFeatureIsEnabled(key: string) {
const globalFeatures = this.store.state.globalFeatures;
if (!(globalFeatures?.enabledFeatures)) { return false };
return globalFeatures.enabledFeatures.indexOf(key) != -1;
}
getGlobalFeatureIsEnabled$(key: string) {

Loading…
Cancel
Save