diff --git a/src/app/components_ngrx/planner-query/planner-query.module.ts b/src/app/components_ngrx/planner-query/planner-query.module.ts index 8042bdd39..eeaea68c7 100644 --- a/src/app/components_ngrx/planner-query/planner-query.module.ts +++ b/src/app/components_ngrx/planner-query/planner-query.module.ts @@ -3,6 +3,9 @@ import { NgModule } from '@angular/core'; import { PlannerQueryRoutingModule } from './planner-query-routing.module'; import { PlannerQueryComponent } from './planner-query.component'; +import { FeatureFlagResolver, FeatureTogglesService } from 'ngx-feature-flag'; +import { togglesApiUrlProvider } from '../../shared/toggles-api.provider'; + @NgModule({ imports: [ CommonModule, @@ -13,6 +16,9 @@ import { PlannerQueryComponent } from './planner-query.component'; ], exports: [ PlannerQueryComponent + ], + providers: [ + FeatureFlagResolver, FeatureTogglesService, togglesApiUrlProvider ] }) export class PlannerQueryModule { } diff --git a/src/app/shared/toggles-api.provider.ts b/src/app/shared/toggles-api.provider.ts new file mode 100644 index 000000000..8facdeb87 --- /dev/null +++ b/src/app/shared/toggles-api.provider.ts @@ -0,0 +1,12 @@ +import { InjectionToken } from '@angular/core'; +import { FABRIC8_FEATURE_TOGGLES_API_URL } from 'ngx-feature-flag'; + +let witApiUrlFactory = () => { + return process.env.FABRIC8_WIT_API_URL; +}; + +// for now use wit proxy for toggles-services +export let togglesApiUrlProvider = { + provide: FABRIC8_FEATURE_TOGGLES_API_URL as InjectionToken, + useFactory: witApiUrlFactory +};