Angularjs error:has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource
When i m trying to access nodejs api using angular its throwing this error Solution:
1 2 3 4 5 |
npm install cors --save use the below code in the nodejs file var cors = require('cors') app.use(cors()) |