Loading a config file in Angular

I have multiple server environment and i need to change backend URL on every Environment , I need to read
backend URL from external file path in angular and set this file on every server and when I make new deployment on any server read from this file