<p>I would like to add the link to some field and part of that link should differ depends on the used environment. Lets say that I have dev and prod environment.</p>
<ul>
<li>Link for dev should looks like: &quot;<em>https://dev.mytest.com</em>&quot;</li>
<li>Link for prod should looks like: &quot;<em>https://prod.mytest.com</em>&quot;</li>
</ul>
<p>I think that I should somehow put these variables to application.yaml (maybe kubernetes here would be helpful?) but I don't know how to access these variables in typescript file. I'm using spring in my project with the application.yaml file.
Could you give me some tips how I should achieve that or sent a link for helpful articles?</p>

Koin Arab
<p>You can use some files, usually called <code>environment.[xyz].ts</code>, to achieve some configuration depending on the type of build configured in your <code>angular.json</code> file.</p>
<p>For more informations: <a href="https://angular.io/guide/build" rel="nofollow noreferrer">https://angular.io/guide/build</a></p>
<p>=== EDIT ===</p>
<p>If you need it to be a runtime configuration, you can create a JSON file into <code>src/assets/</code>, retrieve it and parse it with a service by making a simple http call, like: this.http.get('/assets/xyz.json') and storing the configuration inside the service.</p>
<p>To be sure that when you will use this service (via injection) the configuration will be already loaded, you can set its load configuration fuction to be executed on app startup with the <code>APP_INITIALIZER</code> DI token.</p>
<p><a href="https://www.tektutorialshub.com/angular/angular-runtime-configuration/" rel="nofollow noreferrer">This tutorial</a> explains in details what I'm suggesting.</p>
