I have home page it contains with list of 2 images i have given controller and Html code.every time home page images loading from backend i want to cache the image in local to avoid every time http request and weekly once or 10 days once i want to check from backend if backend image has changed that time i need to update this cache image . i have followed some example but i could not solve this because i am new to this technology some one help me out to move forward
.controller('TestCtrl', [
'$scope', '$http', '$location', '$window', '$ionicLoading',
function($scope, $http, $location, $window, $ionicLoading) {
$scope.find = function() {
$http.get('****').success(function(data, status, headers, config, response) {
$scope.image1 = data[0].Images1;
$scope.image2 = data[1].Images2;
})
}
}
])
//console i am getting image1:http://res.cloudinary.com/dl34322/image/upload/q_58/v1437810617/store1.png image2:http://res.cloudinary.com/dl34322/image/upload/q_58/v1437810617/store2.png
<ion-view title="Home" data-ng-controller="TestCtrl" data-ng-init="find()">
<ion-content>
<div class="list card">
<div class="item item-image">
<img src="{{image1}}">
</div>
</div>
<div class="list card">
<div class="item item-image">
<img src="{{image2}}" >
</div>
</div>
</ion-content>
</ion-view >