I want to deploy a production build of angular app with a configurable api url for the user to test it out. I use the environment.ts but after the production build, I do not
Well unless we need some async call to get them. Otherwise I would suggest this:
env.js
(function (window) {
window._env = window._env || {};
window._env.url= 'http://api-url.com';
}());
index.html
Finally add it in angular.json
"assets": [
"any/env.js",
Now you can just read the window using a service in your app