Monaca Onsen UI Discord Chat Github Repo

How to add #hash for the urls / pushState

  • I am new in this framework - looks great!

    When i go to page2.html i want #hash (


    I don’t find this idea in the docs (Framework7 for example call this pushState).


  • administrators

    There’s no support for URLs built in to Onsen UI but you can add it quite easily:

        .pushPage('page2.html', {data: {hash: 'page2'}})
        .then((page) => {
          window.location.hash =;

    (Note: I haven’t actually tested the line that sets the hash in this example but something like this should work.)