Is there a way to have a search value and hash in url?

I made an URL ROUTER using hash (e.g. #User.Account) And i'm trying to add a search value to it (e.g. #/User.Account?id=729) How do i do that?

My router works by doing

    if(window.location.hash == "#User.Account") {
      // show account page code
    }

1 answer

  • answered 2020-11-28 12:49 Or Assayag

    history.pushState(null,null,'#User.Account?id=729');