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

    Setting default route

    Help
    2
    6
    598
    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.
    • J
      J2R last edited by J2R

      Just starting out with Quasar and I’ve tweaked the basic app created by ‘quasar create …’ to play around with. When it starts up, the app is available at ‘http://localhost:8080/#/’. What would be causing this ‘#/’ at the end, and how can I get it instead to be simply ‘http://localhost:8080’?

      beets 1 Reply Last reply Reply Quote 0
      • beets
        beets @J2R last edited by

        @J2R You need to set history mode instead of hash mode: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build

        Note that it will require you to set up your webserver to handle it, as seen here: https://quasar.dev/quasar-cli/developing-spa/deploying#General-deployment

        The above nginx config isn’t unique to Quasar, so you can find tons of examples with searches like “vue history mode nginx / apache” or “spa history mode nginx / apache”

        J 1 Reply Last reply Reply Quote 1
        • J
          J2R @beets last edited by

          @beets , thanks, that’s helpful. I can easily do that, and in fact I’ve done it already in a couple of Vue apps.

          1 Reply Last reply Reply Quote 0
          • J
            J2R last edited by

            I’ve made the change so now have vueRouterMode: 'history'. But in dev mode it doesn’t make any difference, I’m still seeing the /#/. Does something else need to be configured in dev mode?

            beets 1 Reply Last reply Reply Quote 0
            • beets
              beets @J2R last edited by

              @J2R Maybe just restart the dev server, but that shouldn’t be needed. Make sure you’re not just still seeing the /#/ since the hot module reload won’t remove it. Try opening http://localhost:8080/ in a new tab and check there.

              1 Reply Last reply Reply Quote 0
              • J
                J2R last edited by

                Forget that, it was a simple error on my part. Works fine, thanks!

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