Category "vue-router"

How to destroy/unmount vue.js 3 components?

I have a fairly large vue.js 2 application that has a dynamic tabs mechanism. Users can interact with the application opening and closing tabs, each tab represe

jQuery not working in vue component when change route

I have an issue with jQuery script files is not working inside vue component but it working outside it, I found a solution to put all script files in script sec

How to react to route changes on Vue 3, "script setup" composition API?

This is an example of routes I have in my application: { path: "/something", name: "SomeRoute", component: SomeComponent, meta: {showExtra: true}, }, {

Vue 3: component not rendering when added with router-view

I have created vue app using vue-cli and instead of html I have added my component TopBar for links and those links are not getting rendered. App.vue <templa

Detect navigation abort/cancel in a guard

Currently it's expected that the navigation is confirmed, so both beforeEach and afterEach global guards are triggered. showSpinner and hideSpinner are supposed

VueJS How to Implement RouterGaurd

In a real-world Vue application, the router can easily get to several hundred line long so I split the router.js into separate (component) route files and impor

How to handle permissions for route from database?

In Vue, when I want to restrict some pages for some users, in router I define a permission in meta, like this: routes: [ { path: 'transport',

What is <router-view :key="$route.fullPath">?

I'm completely new to Vue.js and I think I have a bit of understanding of how a router works with things like: <router-link to="/"> But I am not really u

Activate method on router link click in Vue

I am working on account removal on a Chrome extension and I have the following button: <button @click="remove" id="button_remove" class="btn btn-default" sty

vue-router, nginx and direct link

I'm trying to setup a vue-router on my nginx server. The issue I'm having is that my route doesn't work if I enter url directly to the browser myapp.com/mypath.

vue-router : router-link not working

I'm trying to use vue-router and router-link. When I click on the link, the URL updates correctly, but nothing is loaded into <router-view></router-vie

Vue Dynamic Layouts mounting router-view component twice

I setup my Vue project to use dynamic layouts - that is, layouts that persist from page to page, assuming the layout for the new page is the same as the last pa

render a Vue slot in a layout from component

I'm having problems with a named slot. This seems like it should work. In the code below I'm trying to use a named slot "sidebar". I would expect my sidebar slo

Vue 2 - render components from an ajax response

Is there a way to render components that come from an ajax response? For example, I registered a component "Test" and in the ajax response I have: <p>d

Deploy VUE application on IIS [closed]

I'm trying to deploy a VUE frontend application on IIS. The routing is working fine in dev mode, however, something seems to break in the rout

Passing props to Vue.js components instantiated by Vue-router

Suppose I have a Vue.js component like this: var Bar = Vue.extend({ props: ['my-props'], template: '<p>This is bar!</p>' }); And I want t

How to use vue router and vuex inside custom element from root?

I have project with nested custom elements. Now I need to vuex & vue router. How I can use this packages from root custom element and then use in all child

How do I pass data in $router.push in Vue.js?

I am creating an alert component for a CRUD app using Vue.js. I want a message to be passed to another component once data has been saved. Currently I am trying

In Nuxt, how do you pass data from layouts to pages?

For example, in my /layouts/sidebar.vue I have the following code: <template> <div class="mainContainer"> <nuxt :date-sidebar="'This is

How can i make sure a vuex action has finished before the page loads

I have 2 issues where i pull data from an api and use it. However, the page loads before the api request has completed. My first problem is in the router. I hav