Skip to content

Commit c436437

Browse files
committed
fix(clearCache): ensure async transition completed
Closes #2939
1 parent cc5ed7b commit c436437

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: js/angular/service/history.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,10 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
615615
* This both removes the view element from the DOM, and destroy it's scope.
616616
*/
617617
clearCache: function() {
618-
$ionicNavViewDelegate._instances.forEach(function(instance) {
619-
instance.clearCache();
618+
$timeout(function() {
619+
$ionicNavViewDelegate._instances.forEach(function(instance) {
620+
instance.clearCache();
621+
});
620622
});
621623
},
622624

0 commit comments

Comments
 (0)