Home > Software engineering >  Failed to load resource. I am makign an angular project . The API does not seem to show data in brow
Failed to load resource. I am makign an angular project . The API does not seem to show data in brow

Time:03-24

I am building an angular project. When I do ng serve I do not see any data in the browser instead the call is failing. Any idea why?

enter image description here

CodePudding user response:

Have you enabled CORS(Cross-origin resource sharing) on your API? seems connection refused in communicating your API and also port 5001 is running on https.

CodePudding user response:

Your request URL is wrong. If your API is running on localhost, prepend that to your request url.

Currently, all you can see is the port and rest of the path, no basepath.

  • Related