Is there any way to hide API credentials in Angular?
I tried to implement the code in my project and it seems that this not work properly, I don't know if this is compatible with angular 9, I followed the steps and still I got an error.
Please see the link and my sample code below, https://www.ninadsubba.in/blog/setup-dotenv-to-access-environment-variables-in-angular-9
environment.ts
.env
Terminal Output
I already installed the following package: npm install --save-dev yargs dotenv and npm install @types/node --save-dev and still this error appear, please helped me to resolve this issue to clearly understand how dotenv can be useful to hide credentials in angular, or if this only works on node.js, sorry guys I'm very new in angular. Thanks in advance.


