I\'m getting this error using ngResource to call a REST API on Amazon Web Services:
XMLHttpRequest cannot load http://server.apiurl.com:8000/s/login
To fix cross-origin-requests issues in a Node JS application:
npm i cors
And simply add the lines below to the app.js
app.js
let cors = require('cors') app.use(cors())