Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49164

Ionic Clear Cache

$
0
0

@anicacute09 wrote:

Hi guys, I have a button that whenever i Logout and returns to Login View it clear all the cache.. now I was facing a problem as I Login for the first time and Logout immediately, It doesn't clear the cache of Login view and as I repeat to login again and logout... the function works now.. What would be the best solution here?

.controller('LoungeCtrl', function ($scope, $state, $ionicHistory, Data) {

$scope.logout = function () {
        $ionicHistory.clearCache();
        $ionicHistory.clearHistory();
        $state.go('index');
};

})

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>