diff --git a/js/angular/service/history.js b/js/angular/service/history.js index 994d6c505df..be42298d864 100644 --- a/js/angular/service/history.js +++ b/js/angular/service/history.js @@ -648,11 +648,12 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $ /** * @ngdoc method * @name $ionicHistory#clearCache + * @return promise * @description Removes all cached views within every {@link ionic.directive:ionNavView}. * This both removes the view element from the DOM, and destroy it's scope. */ clearCache: function(stateIds) { - $timeout(function() { + return $timeout(function() { $ionicNavViewDelegate._instances.forEach(function(instance) { instance.clearCache(stateIds); });