How to inject environment variables into your Angular applications #161
Replies: 6 comments 13 replies
-
Would be great if the code example(s) were placed in context. I.e. ID where the heck to put it. |
Beta Was this translation helpful? Give feedback.
-
The code examples for someone new to Angular, IDK what files the code belongs in. I inferred that several code examples were refinements of previous examples, but I'm not sure about that. I haven't been able to gather what code actually needs to be put where. |
Beta Was this translation helpful? Give feedback.
-
Where is the function |
Beta Was this translation helpful? Give feedback.
-
Thanks for the package and article. After installing the @ngx-env/builder package to an Angular project, I came across an error during start up: |
Beta Was this translation helpful? Give feedback.
-
@chihab is there a way to avoid having extra env file (.env) and use directly the environement files? I find .env great for React apps as they don't have any env to begin with, but not Angular ... |
Beta Was this translation helpful? Give feedback.
-
My problem is that my Angular app is hosted as a static app (there is no Node server) and I need it to be configured with environment variables. Examples of hosting options I have: Azure Static Web Apps or Azure App Service running .Net Core Web API. So far the only solution I've found is this: Know of other options I might have? |
Beta Was this translation helpful? Give feedback.
-
Discussion about the article How to inject environment variables into your Angular applications
Beta Was this translation helpful? Give feedback.
All reactions