Skip to content

Commit

Permalink
feat(clearCache): clearCache returns a promise
Browse files Browse the repository at this point in the history
Closes #3724
  • Loading branch information
abcd-ca authored and mhartington committed Aug 8, 2015
1 parent e2c664c commit 336c388
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/angular/service/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 336c388

Please sign in to comment.