I have a state:
.state({
name: "some_url",
url: "/some",
templateUrl: "views/some.html",
controller: 'someCtrl',
params: {
someData: {
'mout': null,
}
}
})
Following that, I update it in the controller:
$scope.someData = $stateParams.someData;
$scope.someData['mykey'] = 2;
and navigate to the next URL:
$state.go("next_url");
If later on the next URL I do:
console.log($stateParams.someData)
It returns undefined, which is expected.
However, if I then go back to $state.go("some_url");
, and do:
console.log($stateParams.someData)
It displays:
{'mykey': 2}
Is there a way to clear the stateParams
?