I have developed an angular 7 app with express backend. Express running on localhost:3000
and angular client is running on localhost:4200.
In the
Since, your angular app is running on 4200 port and backend running on 3000 port, the origin of both the application is different.
To solve this problem, you can setup "nginx" in your machine.
This will make all your requests from angular and backend, go via "nginx" server. Thus, solving the problem of CORS.