src/app/services/feature-flag.service.ts
Properties |
Methods |
constructor(http: HttpClient)
|
||||||
Defined in src/app/services/feature-flag.service.ts:8
|
||||||
Parameters :
|
getFeatureFlag | ||||||
getFeatureFlag(domain: string)
|
||||||
Defined in src/app/services/feature-flag.service.ts:13
|
||||||
Parameters :
Returns :
Observable<any>
|
domain$ |
domain$:
|
Type : any
|
Defined in src/app/services/feature-flag.service.ts:8
|
environment |
environment:
|
Type : string
|
Default value : ""
|
Defined in src/app/services/feature-flag.service.ts:11
|
featureFlagUrl |
featureFlagUrl:
|
Type : string
|
Default value : ""
|
Defined in src/app/services/feature-flag.service.ts:10
|
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';
@Injectable()
export class FeatureFlagService {
domain$: any;
constructor(private http: HttpClient) {}
featureFlagUrl = "";
environment = "";
getFeatureFlag(domain: string): Observable<any> {
this.environment = environment.production === true ? "prod" : "qa";
this.featureFlagUrl = "https://flags.alliedpayment.com/" + domain.toLocaleLowerCase() + "/rt247_" + this.environment + "_p2p?t=" + new Date().getTime();
const response = this.http.get(this.featureFlagUrl);
return response;
}
}