Reload: true only works once

I am trying to pass parameters from one view to another in my anulgar / ionic application.

in view volCompute(declared $ stateParams):

if ($stateParams.modelLine){
    console.log('receiving', $stateParams.modelLine.id, $stateParams.modelLine.modelStrict)
    $scope.data.chosenModel = $stateParams.modelLine.modelStrict;
}

in view compare:

$state.go('app.volCompute', { modelLine: test[0] }, {reload: true});

but it only works once, if I switch back and forth between two views, the code in volComputedoes not start. It seems to be reload: trueexecuted only once.

You can help?

0
source share
2 answers

There are a few more details on how to understand ionic caches.

hook $ionicView.enter $ionicView.afterEnter

$scope.$on('$ionicView.enter', function(){
  // Coding
});

doc

+1

:

$stateProvider.state('myState', {
   cache: false,
   url : '/myUrl',
   templateUrl : 'my-template.html'
})

inidividually <ion-view>:

<ion-view cache-view="false">
    ...
</ion-view>
0

All Articles