Configure URL from server before http-request in Angular

Configure URL from server before http-request in Angular

For an angular application which is deployed inhouse to several customers,
the application has to figure out, where the backend server exists.

Setting the url in the environment was not useful, as each customer needs
his own url and this would end up in big build scripts.

Also the customer could not reorganize the server names on his own, without
breaking the application if he chooses to change the server name.

So we tried to be clever and to figure out where the server might be in
loading a configuration file from an untouched json file in the application.

find json file with url in application diagram

Or

Read More