- Create file src/proxy.conf.json in the root of the Angular App / Project
- Define proxy configuration values in angular.json
angular.json
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "todo:build",
"proxyConfig": "projects/todo/src/proxy.conf.json"
},
"configurations": {
"production": {
"browserTarget": "todo:build:production"
},
"development": {
"browserTarget": "todo:build:development"
}
},
"defaultConfiguration": "development"
},