I have built a hybrid app with ionic framework. I have used angular imgcache (https://github.com/jBenes/angular-imgcache.js/tree/master) to allow caching of images fetched from an external site.
I am using code such as:
<img img-cache ic-src="{{src}}"/>
It works a treat in browser (after using 'ionic serve') on command line. I have tested it in ionic view iOS app. I have now take the xcodeproj that it creates and distributed it for testing but the images do not load.
I have even added the cordova whitelist plugin and set metas to allow CORS requests.
Does anybody have any other ideas what the issue could be?
First, make sure you set the img cache to manual init ImgCacheProvider.manualInit = true;
in your app.config
function.
Second step - call ImgCache.$init()
anytime after deviceready event (in your case, somewhere in the $ionicPlatform.ready
function).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With