I want update the url without page reloading or refresh. I've tried with below logic but no luck. Every time page is loading. Any help please?
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?k=' + vm.name + '&l=' + vm.sid;
//var newurl = $location.protocol() + "//" + $location.host() + $location.path() + '?k=' + vm.name + '&l=' + vm.sid
//window.history.pushState({ path: newurl }, '', newurl);
//window.history.replaceState(null, null, newurl);
//window.location.hash = 'k=' + vm.name + '&l=' + vm.sid
//document.location = newurl;