Skip to content

Commit 336c388

Browse files
abcd-camhartington
authored andcommitted
feat(clearCache): clearCache returns a promise
Closes #3724
1 parent e2c664c commit 336c388

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,12 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
648648
/**
649649
* @ngdoc method
650650
* @name $ionicHistory#clearCache
651+
* @return promise
651652
* @description Removes all cached views within every {@link ionic.directive:ionNavView}.
652653
* This both removes the view element from the DOM, and destroy it's scope.
653654
*/
654655
clearCache: function(stateIds) {
655-
$timeout(function() {
656+
return $timeout(function() {
656657
$ionicNavViewDelegate._instances.forEach(function(instance) {
657658
instance.clearCache(stateIds);
658659
});

0 commit comments

Comments
 (0)