The tab app template in Ionic contains a few external images, and they won't load when I open the app in my Android emulator or my Nexus 5. Both the device and the emulatir do have internet connection and I can load these images manually in the browser.
It works OK in the browser (ionic serve).
That is:
ionic start myApp tabs
cd myApp
ionic serve # OK
ionic platform add android
ionic build android
ionic emulate android # Images are not loaded
ionic run android # Images are not loaded
ionic serve:
Android emulator (Nexus 5):
ionic 1.3.22 cordova 5.0.0
What I am missing?
Here is the solution:
ionic plugin add cordova-plugin-whitelist
External resources won't load without it.
As joeri said:
ionic plugin add cordova-plugin-whitelist
will fix the issue, Here is the api link to explain how it works. plugin API
in my cordova config.xml file I have
<access origin="*"/>
doing this Doesn't block any requests
The API explaination has a few more options if you want to restrict it more, here