Skip to content

Commit

Permalink
fix(clearCache): ensure async transition completed
Browse files Browse the repository at this point in the history
Closes #2939
  • Loading branch information
adamdbradley committed Apr 13, 2015
1 parent cc5ed7b commit c436437
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/angular/service/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,10 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
* This both removes the view element from the DOM, and destroy it's scope.
*/
clearCache: function() {
$ionicNavViewDelegate._instances.forEach(function(instance) {
instance.clearCache();
$timeout(function() {
$ionicNavViewDelegate._instances.forEach(function(instance) {
instance.clearCache();
});
});
},

Expand Down

0 comments on commit c436437

Please sign in to comment.