DRW
DRW

Reputation: 375

how to open a vuetify dialog using routes from vue router

I am trying to figure out how to open a Vuetify dialog using the Vue router. The vue-router is a new experience for me so still learning it. But Ive been working on this all day and have not come anywhere close to solving the issue.

Issue: I need to update the v-model to true to open the dialog when a router link is clicked

I have tried using meta tags and the beforerouterupdate() method to try and update the v-model but that has not worked.

This is my current route file

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home,
  },
{
    path: '/backup',
    name: 'backup',
    component: BackupDialog,
    children: [
      {
        path: '/backup/:options',
        name: 'optionsModal',
        component: DbBackupOptions,
        meta: {
          showModal: true
        }
      },
    ]
  },
]

I am not sure I have the right configuration at this point. I also tried using dynamic routing but I could not figure that out either.

Is there some one that can give me some insight on how to resolve this issue or pointers in the right direction ?

Upvotes: 2

Views: 2777

Answers (1)

DRW
DRW

Reputation: 375

I have figured out the issue mostly to the help of a video I found on Youtube.

Vue Router Based Modal

Upvotes: 3

Related Questions