i tried to get dynamic data from a external url using get method in http, it works fine in browser but when i run it from device the get request is not processed and returns status 0. CORS is also enabled. the controller is added below for reference
I am sorry about not putting the response and thank you very much for the help. even after implementing what you said now i am not getting any output even in browser. the output is
on your debugger (google dev-tools in my case) check your Network tab to see what is the response what code do you get when the data is requested e.g. code 200 is ok 401 file no found or 500 server error, then if the response is 200 then you should have a break point in before resolve the promise to check o the data retrieve, if the call is successful the break point will stop on the resolve part of the service but the response could be empty, so then check on the sever service.
It is pretty hard to see the solution without the console errors if you have some screen shoots of the error, and the headers of the service call so we can see the output would be better. now if you don’t have the dev-tools to debug let me know I will point you in the right direction so look into it.
Now i think if any service that you call retrieves cero data, then is a network issue no the service itself, and this could be due to many problems on the network on the phone, but to be sure the info from the debugger is key to solve this puzzle
where may I verify that information do you have a link, because all my services works perfect fine, and I would like to look into it before I mess the services that are working already.
ok let me do a plunker that works for you and if still not getting data then you need to debug with a device and use the google developer tools to gather more info about the issue.
I’m running my app in android what kind of device and api are you using and remember to debug you need a device with 4.4 android version at lease and API 19 otherwise is impossible to debug .