ui-router
ui-router copied to clipboard
Clear $stateParams
Hello,
Is there a way to clear $stateparams?
When routing between states some the $stateParams stays there and causing me a big mess in the app. I there a way to clear stateParams?
Thanks!
Hi, better to ask this sort of question on SOF
http://bit.ly/UIR-SOF
You can clear the values by setting the key to undefined when you transition.
For example, to transition to the current state but clear the time parameter you can do:
$state.go('.', {time: undefined} );
Thanks!