angularjs - Ionic app not working on mobile device -


i have created ionic application, accessing data different domain. in order make work, have done following @ server side(express):

app.use(function(req, res, next) { res.header("access-control-allow-origin", "http://localhost:8100"); res.header("access-control-allow-methods",  "get,put,post,delete,options"); res.setheader('access-control-allow-headers', 'x-requested-with,content-type, authorization, access-control-allow-origin, access-control-allow-headers'); res.header("access-control-allow-credentials", "true"); next(); }); 

as seen, have set origin localhost:8100, making application work , run on browser. however, when create .apk file , install on mobile device, not working i.e. data not coming.

could please me out issue. issue arising because of origin specified ? if yes, there solution same.

do have cordova whitelist plugin. if yes , check access origin settings in config.xml , meta tag security in index.html. validate settings https://github.com/apache/cordova-plugin-whitelist


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -