My question is similar to this one here, I'm creating a new question because I can't comment: How to store the root url of api in angular 4 app?
I like Mike Kovetsky`s answer but I'm not too sure on how to implement in my case, basically I want the user to be able to change the endpoints (pre selected through config files).
So, how can I change API_URL programmatically?