first step:
npm install --save-dev https-proxy-agent
add proxy.conf.json to top level next to package.json
File should look like this:
{
"/": {
"target": "http://target/service/api",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
}
}
on environment.json use this:
"API": "http://localhost:4200",
ng serve --proxy-config proxy.conf.json