I have two components for editing JSON objects. And i have a button that switches between these two. Here is the html code: //Javascript code Start value for showJsonEditor = true, showTextEditor = false gives me the error: Cannot set property ‘innerHTML’ of null”, Vue i tried setting the the code like below No error is shown but also no
Tag: vue.js
How to render VueJS templates dynamically inside custom element
I’m using Vue to build an app with Esri’s Mapping API. Via the Esri API, I’m able to set a popup template content using an object: and a function However, I would like the getTemplate function to return a Vue component rendered in the innerHTML instead of hard coded html. I have a component: and suspect it has something to
How to watch if a token gets registered in localStorage and change the value of a binded property accordingly?
Currently, whenever a user logs in using correct credentials, a token get saved in the local storage. Now I’m trying to hide signin and signup after the user logs in. The code I currently have works relatively alright, however, I noticed that when the user logs in, the signin and signup routes do not disappear until the page is refreshed
Cannot call a function inside mounted()
I have a chat API that I’m connecting to a Vue.js project. When user goes to a chat room page, it sends an ajax request and then calls the function that fetches the whole chat history: but it fails with: TypeError: _this.fetchChatSessionHistory is not a function I understand that it might be defined at a wrong place but I have
Vue.js: how to use the logical Operators in a template?
I would simply like to use 2 different v-if into the same div, as the following: Actually I have this code: Containing only one v-if. And I would like to use 2 or more v-if inside the same condition, like for instance: But it give me a lot of error and I would simply like to learn the correct way
Calling Vue method from inside mounted function
In my Vue mounted code, I am calling a function test via this.test(). This works fine as intended. When however I am calling this.test() from the new ResizeObserver function, I am getting an error this.test is not a function I understand that this is because the this there is now pointing to the resizeObserver. What I do not understand is
Vue filter array A by array B
I have a table with data from a rest API. The table has objects with unique ids and I have a group filter with unique group ids. The group id does not appear in the table, therefore I have to create an array which only contains the ids of the table objects. Every time the group changes the array will
Uncaught (in promise) TypeError: Cannot set property ‘playerName’ of undefined at eval
I’m trying to assign response.data.Response.displayName from my GET request to my playerName property, however, I am getting an error “Uncaught (in promise) TypeError: Cannot set property ‘playerName’ of undefined at eval”. I am successfully console logging response.data.Reponse.displayName so there is a displayName in it. Why am I getting this error? Answer Other comments and answers are correct – using an
Vue wrapper component not working properly with axios
Hi I’m trying to change my vue wrapper component dropdown with axios. This is my code. The problem I have is when I try to add selected item it’s not working inside axios. And it’s working properly outside axios. I got selected the all initially as the image shows. Think ajax call does not matter so I reduced the code
Vue js with simple JavaScript Vue is undefined
I am trying to understand how vue works. To do that I simplify it as much as possible, hence no webpack no CDNs or any other packages (unless its a necessity). So, Came up with this but trying to inject a simple a variable into html gives vue is undefined error. *vue.js file is taken from npm vue package. Answer