Questions tagged [nuxt.js]
Nuxt.js is a framework for creating Vue.js applications, you can choose between Universal, Static Generated or Single Page application (inspired by Next.js)
nuxt.js
13,083
questions
10
votes
1
answer
2k
views
How to include static assets dynamically with nuxt generate?
I'm working on a static site using Nuxt.js (I target to publish just the result of nuxt generate).
The content is generated based on asyncData by calling a json API.
I want to grab some files and ...
0
votes
3
answers
245
views
Vue js 2 list rendering issue
I have faced an issue when doing a simple shopping cart app in vue js 2
Here is the code I have:
blank cart item array for when I press add to cart button then that particular product will be pushed ...
2
votes
2
answers
5k
views
Access store in nuxt config file
I want to add dynamic routes to be statically generated via Nuxt.
I have a client/server-side store defined thanks to asyncData method. I want to map this store value (an array) in my nuxt.config.js ...
1
vote
1
answer
3k
views
How to get vee-validator's $validator when using nuxt.js
I have installed vee-validator in my nuxt.js install (using the express template).
I have added the plugin into my nuxt.config.js file like so:
plugins: [
{ src: '~plugins/vee-validate.js' }
]
...
1
vote
1
answer
2k
views
How to trigger language in Nuxt js internationalization (i18n) example explanation?
In Nuxt.Js doc, there is an example of internationalization(i18n). I get most part but What I don't get is how clicking on the Language option on the Navbar menu changing the locale from 'en' to 'fr' ...
2
votes
1
answer
6k
views
Nuxt.js + vue-i18n + axios : cant't access to data in page
I have difficulties to display data in NuxtJS in the i18n worflow.
Here are two files, I surely miss something in the configuration :
Plugins > i18n.js:
import Vue from 'vue'
import VueI18n from '...
0
votes
1
answer
262
views
Signin Login System in Nuxt, Axios and Feathers
I created a system of login and signup in nuxt, and the system get the database data, i create one 'for' and 'if' to verify if have someone logged, and i have a code to redirect to logged page if the ...
0
votes
1
answer
5k
views
How to import a Javascript file to Nuxt.js
Im trying to import the following javascript files from a website template to my project. Im not sure where the problem lies.
Im interested to convert this website template to a nuxt.js project.
...
1
vote
1
answer
3k
views
Nuxt.js generate data fetched from remote api as a static website
I'm creating a website using Nuxt.js - it contains blog posts, which I hold on my github repo and I query for them via github api.
How can I make this fetched data to be generated after running nuxt ...
5
votes
1
answer
4k
views
How to set global mutation in module vuex js store
I need to be able to change the state of the global variable alert from any Vuex module.
store/index.js:
export const state = () => ({
alert: null
})
store/child.js:
export const mutations ...
2
votes
1
answer
2k
views
Nuxt (Vue), resolve route after login, add beforeGuard on dynamically generated routes
As you know Nuxt automatically generates VueRouter with given pages.
What I want to achieve is to add a custom auth guard.
So basically before rendering a route i check whether user is authenticated ...
2
votes
1
answer
4k
views
How to make a redirect in nuxtjs in component method not fetch method?
I'm using nuxtjs , I want to redirect user after he loggedin, redirect() method not working inside my function:
loginUser: function () {
if (this.isValid) {
return axios.post(`/user/login`,...
70
votes
8
answers
143k
views
How to get current route name in Nuxt 2 and 3?
I'm using Nuxt.js for building a static website.
How to access in component's script code currently displayed route name (I would like to avoid reading direct url from browser location)?
Can I ...
1
vote
1
answer
944
views
I want to load and populate the data for each component in vue.js (nuxt.js)
I start the project as follows.
vue init nuxt/express
my directory is...
components
|- slider.vue
|- list.vue
pages
|- index.vue
and components is,
index.vue
<template>
<my-slider/>...
0
votes
1
answer
407
views
Vue stops tracking array changes
So i'm trying to change an array by removing items that I don't want to be displayed on the page at certain screen sizes. It works and my array is updated properly but after a while the DOM becomes ...