I'm working on an Angular app where I use an external JavaScript lib:
<-- the end of the body element -->
<div id="webapps-sidepanel"></div>
<script src="./assets/js/tecportalapps.js"></script>
<script>
$select('#webapps-sidepanel').getWebapps(localStorage.getItem('TMP_username'));
</script>
</body>
Everything works but now the name of the local storage variable name has changed and I need to take the name of environment which is located in the environment.ts file:
export const environment = {
production: true,
*envName*: 'PROD',
};
So I need to use something like this:
$select('#webapps-sidepanel').getWebapps(localStorage.getItem('TMP_*envName*'));
Is this possible? Any idea on how I can achieve this is welcome. Maybe I can call the $select from the app.component.ts?
localStorage.getItem('TMP_' + environment.envName)?