All Questions
Tagged with vue-cli-3 vue-router
27 questions
1
vote
0
answers
10
views
With Webpack bundling how to either import a file dynamically or not, depending on some process.env.VARIABLE
I would like to be able to tell the webpack bundler to import some file right away if process.env.SOME_VAR evaluates to true and to lazy-load (dynamically import) that file otherwise.
Something like ...
0
votes
1
answer
1k
views
Animation cannot take place between different router views in Vue.js
Summary
I am looking for a solution to create an animation across two different router views in Vue. The problem I met is that when the browser change to another router view, it will re-render the ...
1
vote
0
answers
450
views
Vue - Remove baseUrl from home page
I set baseUrl to "/app", but I need to remove it when I click on home page. So when I click on home page instead of emample.com/app I need to get emample.com.
const router = new VueRouter({
...
0
votes
1
answer
968
views
Vue with own backend code on server (Node.js+Vue.js)
So... for my job I am making a software solution that helps our employees have a centralized location to do their work on since we'll be transitioning to a Microsoft 365/Azure environment. My co-...
0
votes
1
answer
769
views
How to extract Route Params via Props
I am learning VueJs and trying to understand how to extract route params via props.
I was looking at the following documentation, where it seems to have three options to have this done, but I cannot ...
0
votes
1
answer
648
views
<router-link> and JSON questions using Vue.js and Vue Router
I am creating my design portfolio using Vue CLI 3. I am using <router-view> and <router-link> to navigate to my different components. The architecture of my website is very simple. I have ...
0
votes
0
answers
1k
views
nginx is giving 404 error on page reload of my production vue-cli app
I know this is a known problem even explained in vue-cli docs when you use history mode in Vue Router.
If you are using Vue Router in history mode, a simple static file server will fail. For ...
7
votes
3
answers
4k
views
How do I cache other routes for offline browsing?
I am setting up a Progressive Web App supporting offline browsing.
I have already set up offline browsing for my main route ('domainsample.com/') and it responds 200 even if offline.
But when I ...
2
votes
1
answer
371
views
How to access custom static page in VueJS CLI 3 generated app?
I have created a default Vue CLI 3 project (with vue-router) but beside webapp I'd also like to have few static pages (eg. about, faq, terms etc...) that do not require vue framework or any special ...
0
votes
0
answers
67
views
How to save all added/remove items, uploaded images, etc when I change the Vue Route
After adding/removing items from a list or uploading new file(like changing a profile image) those updates/files won't be there after I change the Vue Route and then go back to the Route where I did ...
3
votes
2
answers
1k
views
Setting up a simple example of page routing using vue-router on vue-cli
I am trying to get the simplest of page routing working using vue-cli.
I have been trying to follow the Vue-router documentation (https://router.vuejs.org/guide/#html) as well as various other guides ...
1
vote
1
answer
196
views
What is the best way to set 2 routes to the same component
I know its kind of basic but i cant find the best practice for this one in Vue.js.
I'm using Vue Cli 3 and need to get a few routes pointing to the same Home page in the app.
Basically it should be ...
2
votes
1
answer
205
views
How to prevent visitor from seeing app before redirection?
I am building a SPA using Vue-CLI with a client-side OAuth 2.0 javascript library called JSO. It uses HTML 5.0 localStorage to cache Access Tokens.
In my full app, I have everything functioning ...
0
votes
0
answers
26
views
Active Link not working in router link when the data passed through the router is daynamic
If clicked on this link,
<b-nav-item to="/registro/0" class="registro-link mr-4">
the li tag shows shows it's active css property but when the link becomes
/registro/123 or any other number ...
1
vote
4
answers
3k
views
How to prevent child routes in Vue.js from losing styles when the page refreshes
My routing for my site works fine but the problem arises when I hit the refresh button.
On a base route for example http://localhost:8080/employers the page or component style remains the same but ...