I have an app-const.ts with a server URL:
export class AppConst {
public static serverPath = \'http://10.0.0.126:3031\';
}
This
Another solution would be to add it as a javascript variable in your index.html file. I used this method and it works.
Add it to the "head" part of your index.html with the "script" tags, example:
...
(my global variable is named "LMS_REST_API_URL")
After this you can access this variable like this:
private lms_cli_URL = window["LMS_REST_API_URL"];
I used it directly from the service that needs the URL, but it will probably also work in a seperate app-const.ts class file like you are using.