Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$ionicHistory.clearCache() now returns promise so you can ensure cache is cleared … #3724

Closed
wants to merge 1 commit into from

Conversation

abcd-ca
Copy link

@abcd-ca abcd-ca commented May 13, 2015

Enables promise chaining. Otherwise in the example below, cache would not be clear before $state.go call and app.home would not update.

Example:

// In PreferencesCtrl:
$scope.clearCache().then((function() {
  return knetAccountHelper.updateSettings('preferences');
})).then((function() {
  return $state.go('app.home')
}));

Note, app.home is caching its view by default (I have not set cache:false in its state definition). In the scenario above, I want app.home to be cached in most cases except after leaving my preferences view which affects what is displayed at app.home.

…before using .go when navigating to a cached view. Before, cache wouldn't be cleared before view was navigated to)
@perrygovier perrygovier added this to the 1.0.1 milestone May 14, 2015
@chrfritsch
Copy link

+1 Need that so much. Please merge. Works fine

@mhartington mhartington modified the milestones: 1.0.2, 1.0.1 Jun 23, 2015
@alejandromagnorsky
Copy link

+1. So important feature

Whiskey24 added a commit to Whiskey24/GoingDutchApp that referenced this pull request Jul 20, 2015
This pull request is not in yet: ionic-team/ionic-framework#3724
@echizen
Copy link

echizen commented Jul 22, 2015

+1. otherwise i can't find a good way to go back and refresh page

@jackyon
Copy link

jackyon commented Jul 30, 2015

+1

2 similar comments
@adrienkohlbecker
Copy link

👍

@ghost
Copy link

ghost commented Aug 7, 2015

👍

@mhartington
Copy link
Member

Thanks @abcd-ca, merged in via 336c388

@dotnet54
Copy link

bump, much needed feature

@rinogo
Copy link

rinogo commented Nov 15, 2016

Thanks so much, @abcd-ca! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants