TL;DR: How to configure your Angular project to use a backend while your are developing in local mode.
Rarely you have to develop an isolate Angular app. The normal thing is that it has access to a backend and/or consumes one or more APIs.
Then, you starts the development in your local computer and when you write your service for access to the backend or API, and access with your browser to http://localhost:4200...
Surprise! Probably you have a CORS problem… (at least)
Angular CLI provides a solution to bypass these problems: reverse proxy server.
Enable the Angular Proxy
To use the angular proxy you need to define a configuration file and pass it when invoking.
We use the following proxy.conf
as base template.