Skip to content

Commit

Permalink
Fixed wierd issue with ionic history when overriding load of states
Browse files Browse the repository at this point in the history
This resolves https://github.com/e-mission/e-mission-phone/issues/94
Basically, since the issue is that the history is wrong and loads the
incorrectly cached views, I just clear the history when the user consents.
  • Loading branch information
shankari committed Jul 27, 2016
1 parent f3cfab6 commit a0836bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/js/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ angular.module('emission.intro', ['emission.splash.startprefs',
})

.controller('IntroCtrl', function($scope, $state, $ionicSlideBoxDelegate,
$ionicPopup, ionicToast, $timeout, CommHelper, StartPrefs) {
$ionicPopup, $ionicHistory, ionicToast, $timeout, CommHelper, StartPrefs) {
$scope.getIntroBox = function() {
return $ionicSlideBoxDelegate.$getByHandle('intro-box');
};
Expand Down Expand Up @@ -50,6 +50,7 @@ angular.module('emission.intro', ['emission.splash.startprefs',

$scope.agree = function() {
StartPrefs.markConsented().then(function(response) {
$ionicHistory.clearHistory();
if ($state.is('root.intro')) {
$scope.next();
} else {
Expand Down

0 comments on commit a0836bd

Please sign in to comment.