I am having one condition i.e

```
if(localstorage.testEnv){
   env.apiUrl='testUrl.com';
 }else{
   env.apiUrl='liveUrl.com';
 }

```

I need to inject this code in all the services. Is there any way I can implement this so that their won't be any code duplication.
Also, would this code work? I am trying to update env const (apiUrl) here?