Navigation

    Quasar Framework

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

    Adding and accessing new pages

    Help
    2
    11
    498
    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.
    • s.molinari
      s.molinari last edited by

      Can you post the code in your routes.js and also the q-item you added to the drawer?

      Scott

      1 Reply Last reply Reply Quote 0
      • digiproduct
        digiproduct last edited by

        @s-molinari Thanks for your response.

        I deleted my previous attempt, and tried creating a new page called Leads, so I’ll post what I have now, as it exhibits the same …

        From Routes.js

        const routes = [
        {
        path: ‘/’,
        component: () => import(‘layouts/MyLayout.vue’),
        children: [
        { path: ‘’, component: () => import(‘pages/Index.vue’) }
        ]
        },
        {
        path: ‘/leads’,
        component: () => import(‘layouts/MyLayout.vue’),
        children: [
        { path: ‘’, component: () => import(‘pages/Leads.vue’) }
        ]
        }
        ]

        // Always leave this as last one
        if (process.env.MODE !== ‘ssr’) {
        routes.push({
        path: ‘*’,
        component: () => import(‘pages/Error404.vue’)
        })
        }

        export default routes

        Here’s the Q-item from MyLayour.vue

            <q-item clickable tag="a"  href="/leads">
              <q-item-section avatar>
                <q-icon name="group" />
              </q-item-section>
              <q-item-section>
                <q-item-label>Leads</q-item-label>
                <q-item-label caption>Show all leads</q-item-label>
              </q-item-section>
            </q-item>
        

        And I can confirm that I have a file called Leads.vue in the pages folder

        Thanks for helping.

        1 Reply Last reply Reply Quote 0
        • digiproduct
          digiproduct last edited by

          As an aside … how do I markup code to get it formatted better in replies?

          1 Reply Last reply Reply Quote 0
          • s.molinari
            s.molinari last edited by s.molinari

            Triple backticks. “```”. Wrap your code in them. You can also do “javascript” after the first set of tripple backticks and get highlighting.

            Scott

            1 Reply Last reply Reply Quote 0
            • s.molinari
              s.molinari last edited by s.molinari

              Ok. Try this.

                <q-item clickable to="/leads">
              

              Scott

              1 Reply Last reply Reply Quote 0
              • s.molinari
                s.molinari last edited by

                Also, if you are just beginning with Vue, I’d suggest you take this course.

                https://www.udemy.com/vuejs-2-the-complete-guide

                It will save you and us a lot of unnecessary questions and answers. 😁

                Scott

                digiproduct 1 Reply Last reply Reply Quote 0
                • digiproduct
                  digiproduct last edited by

                  @s-molinari PERFECT … worked immediately

                  So what is the tag=“a” for? Is that for external links? To indicate that it’s a fully qualified url?

                  1 Reply Last reply Reply Quote 0
                  • s.molinari
                    s.molinari last edited by s.molinari

                    Yup. That’s what it’s for. To “fill in” a normal a tag with external URL.

                    Scott

                    1 Reply Last reply Reply Quote 0
                    • digiproduct
                      digiproduct last edited by

                      @s-molinari Thanks, appreciate the confirmation … and many thanks for helping me so quickly … much appreciated.

                      1 Reply Last reply Reply Quote 0
                      • digiproduct
                        digiproduct @s.molinari last edited by

                        @s-molinari said in Adding and accessing new pages:

                        Also, if you are just beginning with Vue, I’d suggest you take this course.

                        https://www.udemy.com/vuejs-2-the-complete-guide

                        It will save you and us a lot of unnecessary questions and answers. 😁

                        Scott

                        This course is currently available on Udemy at the knockdown price of just 11.99 … for the next 5 days only.

                        Just grabbed my copy … it’s a steal.

                        I already have some experience of Vue … but this will still be a great reference resource for such a steal of a price.

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