vue.jsquasar-framework

how can i go to a routed page in quasar?


I'm trying to make this happen when i click the

example:

div

i want it to go to specific page

this example route

{ path: 'petInformation', component: () => import('src/pages/petInformation.vue') },

in quasar component if there is to in its api. routing is good.

example: <q-btn to="petInformation"/>

however, is it possible to make an html element like div when click go to a specific page in quasasr?


Solution

  • Quasar uses Vue Router underneath for page routing.

    Here's an example of how to use Vue Routers Programmatic Navigation to do what you're trying to accomplish.

    <div @click="$router.push('petInformation/')">Click Me</div>
    

    This causes a router push on the div's click.