Closed
Description
The problem occurs when I have some nested states with a optional search parameter at the top level and reloadOnSearch is set to false. e.g.
$stateProvider
.state('top', {
url: '/top?myParam',
reloadOnSearch: false,
template: '<h1>Top</h1><ui-view></ui-view>'
}).state('top.firstLevel', {
url: '/first',
reloadOnSearch: false,
template: '<h1>First</h1><ui-view></ui-view>'
}).state('top.firstLevel.secondLevel', {
url: '/second',
reloadOnSearch: false,
template: '<h1>Second</h1><ui-view></ui-view>'
});
If I enter the 'top.firstLevel.secondLevel' state and set the search parameter myParam to a value and then change the state to a parent state, the value is lost. Even though it is present in the toParams on the state change event.
I would expect the value or myParam to remain no matter how I moved between these states.