I wanted to be able to change the address\' URL without changing the state, as to prevent rerendering. From my search, ui-router
currently does not provide this
What about :
$state.href($state.current.name, $state.params, {absolute: true})
For getting the absolute URL without parameters, I'm finding I need to pass inherit: false
, eg:
$state.href('home', {}, {absolute: true, inherit: false})
Without inherit: false
I was getting any/all params that may be present.
You should use $state.href()
.
To get the absolute URL you can then use:
$state.href('user.home.view', {}, {absolute: true});
To get the URL with the parameters in place you need to add them as the second argument