No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Url start with (#)

    Framework
    3
    5
    5792
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      ballma last edited by

      hello everyone, my problem is how to replace the (#) in url.
      example: http://localhost:8080/#/login
      there always one # in my url, is there any ideas about this?

      B 1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        This has to do with Vue Router hash mode, which is its default mode. You may be interested in Vue Router’s history mode. But you need to understand the differences as it has an impact to the public path (you probably going to need to change it to “/”). Switching to history mode will force you to revise all static assets paths used in your app. Head on to Vue Router’s documentation: https://router.vuejs.org/en/

        B 1 Reply Last reply Reply Quote 0
        • B
          ballma @rstoenescu last edited by

          @rstoenescu said in Url start with (#):

          Vue Router’s history mode

          Thanks for reply, i check it out, which means in quasar-framework i have to replace value of build.publicPath in /config/index.js with non-empty string, switching to history mode?

          But it seems do not work …

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

            @ballma have you also set history mode in src/router.js ? Please read Vue Router documentation top bottom.

            1 Reply Last reply Reply Quote 0
            • B
              bretonio @ballma last edited by

              @ballma thanks for calling attention to this. Setting vueRouterMode: 'history', in my quasar.conf.js cleared things right up. This was a quasar create project and maybe the install script could give you the history option as does vue create. In any event: happiness in Mudville.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post