Using ng-image-cache directive to save the image in cache.
In our scenario, assets contain a list of urls that need to be preloaded so that images are visible even without a internet connection.
html looks like this:
<div ng-repeat="asset in assets">
<ui-image data-src={{asset}} data-title="{{asset}}"></ui-image>
</div>
text
contains html and i am replacing instance of images like this:
var imageUrl = text.substring(decypheredText.indexOf("\"") + 1, text.lastIndexOf("\""));
text.replace('img src', 'ui-image data-src')
.replace('>', ' data-title = "' + imageUrl + '"></ui-image>');
Any help would be appreciated. Thanks in advance.