My code gets data from my server and displays the app perfectly if I run “ionic build ios” and view in the simulator, but if I run “ionic serve”, only what is displayed in codepen shows in the browser. Anything I can put in my code so the data from my server shows in the app on both? Thanks, Ben
Anyone able to help me with this issue? Thanks, Ben
are there any errors in browser console?
when you run your app in browser, your request header have different origin from requested resource header
read about CORS in Ionic http://ionicframework.com/blog/handling-cors-issues-in-ionic/
1 Like
blablapolicja beat me to it. You are getting CORS errors in the console. There is a plugin for Google Chrome that I use for this: CORS plugin
See this post, too.
2 Likes
THANKS to you both! (Needs more characters)