ui-router change url after $state.go <p>I have a route:</p> <pre><code>$stateProvider.state('keeper.telepay.category', { url: '/category-{id}/country-{cid}/region-{rid}' } </code></pre> <p>In all cases when I use $state.go with this route, I want to change <strong>rid</strong> to 'all' if it's value is '0', so my url'll be like </p> <p><strong>/category-1/country-195/region-all</strong></p> <p>I've tried to do it in $rootScope.$on('$stateChangeStart'), but with no luck. Any suggestions || directions would be very appreciated.</p> <p><strong>UPDATE</strong></p> <p>Here what I've tried on $stateChange:</p> <pre><code>$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){ if(toState.name == 'keeper.telepay.category' &amp;&amp; toState.params.rid == 0) { toState.params.rid = 'all'; } } </code></pre>