vue-router Questions
5
I have array of cards like this
<nuxt-link :to="{ name: 'portfolio-slug', params: { slug: card.slug } }">
<a :href="card.link>Go to href</a>
</nuxt-link>
click on card w...
Organzine asked 21/5, 2019 at 21:39
2
Solved
I'm a beginner with vue (vue 3). I'm testing a mock vue application, and after testing the default homepage, i wanted to test how to make 2 (or more) different pages. However, what i do doesn't wor...
Dorsiventral asked 21/1, 2022 at 19:25
4
I can't access my routes from the store.
There may be a good explanation for this.
I use Vuejs3 and Pinia
My store :
import {defineStore} from 'pinia'
import {useRoute} from "vue-router";...
Shope asked 24/2, 2022 at 9:11
17
Solved
I have a single-page app that i've created using vue, and the nav links are all done using router-link tags. There are a couple of items in the nav that my boss wants to have in the nav but disable...
Sporogenesis asked 23/4, 2020 at 20:33
7
Solved
Is there a way to stop getting error from ESLint for single word view name in Vue3?
Every time I run ESLint, I get following message:
1:1 error Component name "About" should always be mu...
Bruns asked 14/12, 2021 at 9:48
4
Solved
I want to make search page which after I click its button will be redirected to another page. And this page will be like this
http://localhost:8080/search?q=foo
and my router index.js looks like t...
Hematuria asked 18/2, 2021 at 1:1
23
Solved
I just enable Vue router history mode. And it work fine when I visit to vue routing via v-href or href. But, when I try to refresh that page or go directly from browser address bar, it just return ...
Veratridine asked 4/4, 2016 at 9:47
6
Solved
i am new to Vue JS, i must say i really love this platform. I started using it just 3 days back. I am just trying to get the URL query parameter and i am using vue-router as well. Here is how i hav...
Ablative asked 7/10, 2020 at 10:56
4
Solved
First of all I've checked and history mode is turned on, I invoke vue-router like so:
const router = new Router({
mode: 'history',
base: process.env.BASE_URL,
routes: routes,
});
The current ro...
Detailed asked 19/10, 2021 at 23:30
2
Solved
I have following route in my application:
const router = new Router({
mode: 'history',
scrollBehavior: () => ({ y: 0 }),
routes: [
{ path: '/', component: HomePage, meta: { pageType: 'home'}...
Mcfarland asked 16/10, 2017 at 18:2
6
Solved
I am using Vue 3 including the Composition API and additionally Pinia as State Management.
In the options API there is a method beforeRouteEnter, which is built into the component itself. Unfortuna...
Jessie asked 14/1, 2022 at 13:0
3
Solved
I'd like to my "SPA" refresh when I click a link, instead of its default behavior where you see the minimal component replacement.
It sounds like I'm killing the best part of SPA, but I feel that ...
Claycomb asked 7/8, 2018 at 2:0
2
Solved
I am trying to pass data from one route to another. However, I need to pass an ID and title to the child route and use only the title in the URL but not the ID. I will use the ID to fetch data. I h...
Historic asked 10/6, 2020 at 18:14
8
when I am randomly moving from one component to another on any point vue gives this error and then i can not move another component.
This error is not on any specific component it can happen anywhe...
Kreiker asked 2/5, 2021 at 19:7
4
I'm trying to understand the logic of mocking the Vue-Router with Vitest.
For this, I tried to set up and mock my test environment on a very simple project. When I tried to proceed according to the...
Idioblast asked 26/10, 2022 at 13:56
4
Solved
<template>
<component
:is="type === 'internal' ? 'router-link' : 'a'"
:to="type === 'internal' ? link : null"
:href="type !== 'internal' ? link : null"
>
<slot />
</comp...
Barbarism asked 31/3, 2020 at 14:31
7
Solved
i get this error: Uncaught Error: [🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?
const pinia = createPinia()
app.use(pinia)
This will fail in production.
at ...
Vday asked 19/2, 2023 at 3:15
5
Solved
I have split my app into multiple chunks with webpack's code splitting feature so that the entire application bundle isn't downloaded when the user visits my webpage.
The chunks that some routes re...
Stater asked 3/7, 2017 at 13:27
7
I'm trying to have a homepage with tabs containing 2 lists, with 1 open by default.
I have the following route config, I've changed the names to simplify
let routes = [{
path: '/',
name: 'home...
Asterism asked 23/2, 2017 at 22:4
10
Solved
In Vue 3, I created the following Home component, 2 other components (Foo and Bar), and passed it to vue-router as shown below. The Home component is created using Vue's component function, whereas...
Generality asked 18/10, 2020 at 2:29
5
Solved
Well, I'm starting with nuxt and I have following routes:
/home
/dashboard
/login
I want to protect the /dashboard, but only for users logged in with a token in localStorage.
The simplest way...
Sw asked 8/9, 2018 at 23:53
5
Solved
I am using Nuxt.js and have some dynamic routes. My folder structure is this:
- pages
- product
- _slug.vue
I link to the route like this:
<nuxt-link :to="{ name: 'product-slug', params: ...
Quinate asked 11/2, 2020 at 12:56
5
Solved
In my Vue project I'm using vue-router. When I navigate away from a certain page I get a vague error and the router stops working. Clicking links updates the URL in the browser, but the app won't n...
Kuska asked 23/6, 2022 at 16:35
24
Solved
I've to use two external scripts for the payment gateways.
Right now both are put in the index.html file.
However, I don't want to load these files at the beginning itself.
The payment gateway is n...
Inexertion asked 12/7, 2017 at 2:2
16
Solved
I can set scrolling behaviour to Vue.js Router like this:
const router = new Router({
mode: 'history',
routes: [
{
path: '/',
name: 'index',
component: Main
},
{
path: '/some-path',
name...
Soembawa asked 21/5, 2018 at 12:39
1 Next >
© 2022 - 2024 — McMap. All rights reserved.