In a vue 3 application that uses composition api, I want to do one of 2 things based on if an authenticated user is verified or not. So if the user is not verified, send the user to the verification page. But if the user is verified, send the user to the dashboard. To achieve this, I am using navigation
Tag: vue.js
TypeError: Cannot set properties of undefined (setting ‘message’) in Vue
i’m new in Vue.js, so there are concepts that maybe i’m missing. The thing is that i’ve been trying to do this for months, but i couldn’t get a solution. What i’m trying to do is change the message of a v-alert but on another js script, importing the variable of said message and changing it. This is a piece
Best practices for declaring or assigning types
I’m a beginner with TypeScript (Day 1), but have worked on above average JavaScript projects. I’m looking for advice about some “best practices” and standards when it comes to declaring or assigning types in code. At the moment, I find myself doing it for literally everything which is essentially making my code unreadable. For example, consider this: This is a
display different comand and result from getElementsByClassName() Method
i just wanna ask how to change or display the different color with “getElementsByClassName() Method” in javascript,so here i want to change the bacground color blue from class “ex”,and color red form class “example”,but it doesnt work. Answer your code works fine but you had two variables with the name collection rename one of them
Can’t get Vue 3 child component to properly recognize prop data
I have a parent and child component in Vue 3. I’m using the options (old) API. I am passing data, an object with a bunch of different properties and values, as a prop like this: When I do this, I get TypeError: Cannot read properties undefined (reading ‘isCustomizable’). Seems like maybe Vue is trying to read itemInfo.isCustomizable before the prop
How to toggle colors in list in Vue?
I have a tree-view component: my not working script: I just want to toggle the item’s color, which I choosed, that is when I click an item(im my code this item has @click event) I want to this item change its color to another, but its huge problem to me to turn back previous item to initial color. Ive struggled
Array.prototype.map() expects a value to be returned, but can’t return null as per other questions, at the end of arrow function
I am using the map function with an if statement that doesn’t end in else. I have to be strict that only the defined recourseTypes are shown. in eslint I get an error on my => as it doesn’t end in an else Array.prototype.map() expects a value to be returned at the end of arrow function. Is there a correct
Mitt event bus, not working inside axios interceptor but works fine in my vue components
I’m working with VueJs and mitt for the eventBus, the mitt is loaded globally as you can see and works fine : main.js I call the eventBus in all my component like that : it works fine this.emitter.emit(‘eventName’, data) My problem is when I use that inside axios interceptor I get an error ( undefined ) my client.js ( axios
Reactive chart with vue-chartjs throws “Maximum call stack size exceeded”
I tried to build a reactive chart with vue-chartjs (Vue v3, Vue ChartJS v4, ChartJS v3). But instead of updating the data in the diagram it just throws the following stack trace every time the interval functions for data computation gets executed: I have no clue where to look for the error. I understand that it hints maybe a recursion
Gmail API : Extract “code” param from the URL of a pop-up window to get the access_token details
Iam trying to authenticate gmail using OAuth2 for my web application. From the server, we return a url to the client, which then uses that to open a pop-up. The code is as shown: From the pop-up , i want to extract the “code” param which google returns to us after the authentication is completed. But when i try to