You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
XMLHttpRequest cannot load http://localhost:3000/api/foods. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
Factory Service
.factory('Foods', ['$resource',
function($resource) {
return $resource('https://damp-dawn-2579.herokuapp.com/api/foods/:foodId', { foodId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
])
How do i overcome this? Thank you
The text was updated successfully, but these errors were encountered:
I am developing an ionic application, trying to access API of MEAN.JS application which is as below which is a link to encoded JSON
https://damp-dawn-2579.herokuapp.com/api/foods
The factory service of my application accesses the above link but gets an error
XMLHttpRequest cannot load http://localhost:3000/api/foods. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.
Factory Service
.factory('Foods', ['$resource',
function($resource) {
return $resource('https://damp-dawn-2579.herokuapp.com/api/foods/:foodId', { foodId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
])
How do i overcome this? Thank you
The text was updated successfully, but these errors were encountered: