I followed the official tutorials and made services for the Apis but absolute url of the Api is hardcoded in services.
I want to keep the base url of Api somewhere so that i can append it to the url path in each service before call. i also need to change the base url of Api before building (or after building).
i tried to put it in sessionstorage, but that is a bad idea as anyone can change it and my application will start hitting other domain.
so i kept it hard-coded and placed a post-push hook on the git to replace the url after build. but it is more like a hack than a solution.
Can i place a file in the root directory of angular and put Api url in json format . And include it in each service so that i can exclude the file from git and each teammate and the build server can have their own file having different url.
What should be the recommended way of doing it?