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

    [solved] Can't get subroutes to work

    Starter Kits
    5
    12
    3848
    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.
    • D
      danielo515 last edited by

      Thank you very much @rstoenescu , that was the kind of documentation I was looking for. I literally scanned the entire documentation and I was unable to find it. It’s a pity that it is hidden on a different version documentation, specially because it is necessary to any beginner like me.

      Now I have to see how can I use buttons to navigate without using tabs. Does this make any sense or should I stick to tabs? I was thinking about use a toolbar with buttons acting as links.

      Again, thanks

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

        @danielo515 Glad it could help you. Quasar is based on Vue, Vue Router, Webpack etc. This assumes any user has knowledge of these technologies. Whenever in doubt, read their own documentation. Duplicating their own documentation into Quasar’s is not optimal anyways. This page is a “bonus” for Quasar developers and it’s part of v0.14 documentation because v0.14 is the future – in a few days (tomorrow or the day after tomorrow) v0.14 is going official, so the “main” documentation will be v0.14’s one.

        1 Reply Last reply Reply Quote 0
        • D
          danielo515 last edited by

          Hello @rstoenescu
          Thank you again.
          I am absolutely fine about checking Vue router or other external documentation. However the usage of tabs or toolbar buttons is a Quasar philosophy specific question. Tabs have several advantages, like being automatically selected in route navigation, however seems they are unable to attend click events. I just want to stick to framework good practices .

          Regards

          1 Reply Last reply Reply Quote 0
          • E
            ERtech last edited by

            Hello, the link above (http://beta.quasar-framework.org/components/integrating-layout-with-router.html) is broken and I really struggle to make my subroutes working.

            const routes = [
              {
                path: '/',
                component: () => import('layouts/MainLayout.vue'),
                children: [
                  { path: '/', component: () => import('pages/Home.vue'), meta: { requiresLogin: true } },
                  { path: '/home', component: () => import('pages/Home.vue'), meta: { requiresLogin: true } },
                  { path: '/memberships', component: () => import('pages/Memberships.vue'), meta: { requiresLogin: true } },
                  { path: '/calendar', component: () => import('pages/Calendar.vue'), meta: { requiresLogin: true } },
                  { path: '/settings', component: () => import('pages/Settings.vue'), meta: { requiresLogin: true } },
                  { path: '/login', component: () => import('pages/Login.vue') },
                  {
                    path: '/editvenue',
                    component: EditPlace,
                    children: [
                      { path: 'test', name: 'EditVenue', component: () => import('pages/EditPlace') }
                    ]
                  }
                ]
              }
            ]
            

            I tried everything and localhost:8080/editvenue/test is always broken:

            GET http://localhost:8080/editvenue/app.js net::ERR_ABORTED 404 (Not Found)

            Sorry for a stupid question but I’m desperate.

            1 Reply Last reply Reply Quote 1
            • metalsadman
              metalsadman last edited by

              @ERtech try moving it not a child of /.

              E 2 Replies Last reply Reply Quote 0
              • E
                ERtech @metalsadman last edited by ERtech

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • E
                  ERtech last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • E
                    ERtech @metalsadman last edited by ERtech

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • E
                      ERtech last edited by ERtech

                      @matalsadman: I had to set history mode in quasar.conf.js:

                       build: {  
                                    vueRouterMode: 'history',
                              }
                      

                      The children syntax didn’t work at all, but I simply could use the following:

                      { path: '/editvenue/test', name: 'test', component: () => import('pages/EditPlace.vue') }
                      

                      Everything works now. I’ll keep this post for anyone experiencing the same problem.

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        tof06 @ERtech last edited by

                        @ERtech Glad you get it to work !
                        But, about the children, did you try to remove the leading / from your path ?

                        According to vue-router documentation :

                        Note that nested paths that start with / will be treated as a root path. This allows you to leverage the component nesting without having to use a nested URL.

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