back soft

مطالب مرتبط با «angular $resource get parameters» در back soft | نویسنده: استخدام کار

angular $resource GET request not working

Vote count: 0 I made a RestAPI and I have the following in my node.js... router.route('/accounts') .get(function(req, res) { console.log("getted"); }); It is prefixed with api... app.use('/api', router); I tested it on PostMan to see if I can make a GET request and it worked using the following... http://localhost:3000/api/accounts Now I am trying to do the same thing from my services.js using $resource... app.factory('Profile', function ($resource) { var getToken = function(){ var get_account = $resource('http://XXX.XXX.X.XX:3000/api/accounts/:id', {id:'@id'}); get_account.get(); } retu { getToken: getToken } }); But now when I call Profile.getToken() I get the following error... ionic.bund...

ادامه مطلب

برچسب‌های مرتبط

angular $resource get | angular $resource get example | angular $resource get headers | angular $resource get array | angular $resource get url | angular $resource get parameters | angular $resource get all | angular $resource get response header | angular resource get json | angular resource get promise