Closed sathishcst10 closed 9 months ago
@sathishcst10 can you share more code here? Are you initialising the client more than once in a given session?
Hi, No, I'm just initializing the client only once, the environmentID , came from the env file in angular.
You don't have flagsmith.init
more than once in your codebase?
Yes, I create service module and initialize flagsmith.init once and I use it across the components, look at the sample code, which im using
import { Injectable } from '@angular/core';
import flagsmith from 'flagsmith';
import { environment } from 'src/environments/environment';
flagsmith.init({
environmentID : environment.config_identity,
cacheFlags : true,
enableAnalytics : false,
identity : environment.user_identity
})
@Injectable({
providedIn: 'root'
})
export class ConfigFlagsService {
logs! : any;
constructor() {
}
get_app_name(){
return flagsmith.getValue('app_name')
}
}
You must be passing in the incorrect environment key.
Hi I'm using FlagSmith for my project, its have three different environment like Dev, staging, prod, In flagSmith calling method i using different Identity keys, but still its calling only Development Environment from flagSmith.
In my angular code sent the stage-env-id but still in the "X-Environment-Key" header dev env id only passed.
please check and fix this asap