Hi,
I have a directive set up which uses the watchPosition() function from $cordovageolocation and then displays a google map with the user’s position plotted on it. This works fine, but if I leave the route with $state.go I am finding strange results. $state.go goes to ‘app.jobs.search’ :
If I leave with $state.go, then use the ionic back button which calls $ionicGoBack(), the directive is still displayed fine
- The problem I have is that I need to send some params back to the original view, so on the search route, I then do:
$ionicHistory.backView().stateParams = {jobCode:jobCode};
$ionicHistory.goBack();
I am then returned to the main jobs page, but the geolocation timesout. If I remove the top line of then it continues to display OK, as though I’ve pressed the $ionicGoBack() button.
Does anyone have any ideas how I can fix this? Thanks in advance for any help