External images won't load in the emulator [Newbie]


#1

Hey,

Newbie here, sorry for potentially dumb questions.

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 do have internet connection and I can load these images in the browser. It works OK in the browser (ionic serve), of course.

Is there anything I am missing?

$ ionic -v
1.3.22

#2

Maybe, this code can helps you:

.config(['$compileProvider', function($compileProvider){
        $compileProvider.imgSrcSanitizationWhitelist(/^(http|https):/);
    }]);

#3

No, it doesn’t help.


#4

Try

ionic plugin add cordova-plugin-whitelist

Due to a change in the latest Cordova release external resources will be blocked without that new plugin.


#5

Thank you, it is working now!