I have a dynamic drawer menu and a dynamic route. But when I select the drawer, the drawer is refreshed with the next page. Where am I doing wrong?
My loop brings up the images in the drawer menu along with the id
<q-item :to="'/categories/' + data.id" id="logos" clickable v-ripple>
Do I need to use this with methods? methods: {
async getAll() {
await VideoService.getCategories().then(res => {
this.menuItem = res.data;
console.log(res)
})
.catch(e => {
console.log(e);
});
},
What should I use here?
mounted() {
this.getAll();
},
this is a my dynamic router
{
path: "/categories/:id",
component: () => import("src/pages/Category.vue"),
},