environment variables
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request
Current behavior I cant find a way to set variables depending on builds
Expected/desired behavior A way to add something like environment variables for the development and production builds.
Minimal reproduction of the problem with instructions NA
What is the motivation / use case for changing the behavior? Set an API URL on localhost or some dev URL, and use another one for production, maybe the same way the angular-cli sets them up in the environments/ folder
Environment
-
Angular version: 4.3.0
-
Browser:
- Chrome (desktop) version XX
- Chrome (Android) version XX
- Chrome (iOS) version XX
- Firefox version XX
- Safari (desktop) version XX
- Safari (iOS) version XX
- IE version XX
- Edge version XX
- For Tooling issues:
- Node version: 8.4.0
- Platform: Windows
- Others: NA
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Environment variable - Wikipedia
An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of...
Read more >An Introduction to Environment Variables and How to Use Them
An environment variable is a variable whose value is set outside the program, typically through functionality built into the operating ...
Read more >How To Set Environment Variables - Twilio
Environment variables, as the name suggests, are variables in your system that describe your environment. The most well known environment ...
Read more >Basic Features: Environment Variables - Next.js
Learn to add and access environment variables in your Next.js application.
Read more >Environment variables - GitHub Docs
GitHub sets default environment variables for each GitHub Actions workflow run. You can also set custom environment variables in your workflow file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kaoz70 https://webpack.js.org/plugins/normal-module-replacement-plugin/ Using that plugin it can be done, having multiple environment files like angular-cli does
#507