I am working on angular application where I want to update router url on some condition. below is the sample code:-
console.log(this.router.url) // it prints '/users'
this.location.replaceState('/users/1') // it updates the url bar with new url
console.log(this.router.url) //it prints same again '/user'
is there any way i can change the current route url without refreshing or reloading the page.