I’m working on a Vue application. It has a header and then the main content. Nesting and structure as below I need to access an element in TheLogin.vue from OrderSummary.vue gives me an error “Cannot read property ‘$emit’ of undefined” so obviously I am not able to access $refs from other components. The question is how do I get hold
Tag: vue.js
Vue.js/JavaScript – Is it possible to insert a link/anchor inside a text?
Let’s say I have a paragraph with some text that I get from some database: However, this text may contain some references to other pages in my aplication: So I would like these references to get turned into links to said pages: I tried using the replace function in the script like this: But the characters all get escaped resulting
How to run method when a div re-init – Vuejs
I try and isRun variable’s change dynamic (switch by user) and i want myMethod and myMethod2 re-run when div re-init. But I try with v-html it only run first time. How to do that. thank. Answer So if you are strictly want to use this methods, computed properties watch their dependencies for changes before they get updated, from the docs
Vue.js get element’s html value by clicking on it’s neighboring element
Hello everyone I’m building a simple notes app and I can’t figure out how to implement one feature. I have a card element and delete button as a child of this element. I need to check if the card element child’s(.card-title) html value(jQuery’s .html()) is equal to the localStorage(I’m using for to loop through the localStorage object) key by clicking
how to see changes in new data generated in a vue component?
Well I hope to explain, I’m generating this data from a component, when I click the checkbox changes in the generated data are not reflected, but when clicking the button with a data already in the instance changes are made, I appreciate if you explain Why or do they have a solution? this my code js html this live code
In Vue.js how to use multiple router-views one of which is inside another component?
I have a Vue.js single page application where there is a main navbar that uses <router-view/> to render different pages. Something like this: In one of those pages I have a sidebar that has more navigation links (that are using <router-link/> just like the main navbar. Something like this: When I click on the sidebar navigation links I want the
How to get route url params in a page in Nuxt2 and 3?
I am using Nuxt.js, and have a dymanic page which is defined under So, when I visit the page url, say, http://localhost:3000/post/hello-world, how can I read this slug parameter value inside my page. Currently I am geting it using asyncData as follows: This is working fine, but I think this is not the best way, and there should be a
Vue.js directives on html rendering
I made this pen. Simple tabs using Vue.js. Each tab get it’s content from this object: To render each tab content: I’m stuck trying to make those click directives on ‘tab.content’ work 🙁 Am I missing something? Thanks in advance. Answer v-html is not Vue content, it is simply innerHTML for an element. You will not be able to use
vue.js – recursive components doesn’t get updated when using nested array from raw json
I am trying to create a tree with an add function using computed data. I used the tree-view example in vuejs official homepage and combined it with the computed function that I created but found no luck in implementing it. I’ve been trying to solve this for 4 days already and still no luck so I am here looking for
Vue JS in HTML Not Recognizing Added Objects and Properties
I have a Vue instance called myApp. I have a method in my Vue JS instance that is called loadPlannedAlerts, which is called during mounted. It’s an AJAX call that first gets JSON data, then adds to it afterwards. The data is a JSON object with key value pairs, that looks something along the lines of {key: ‘value, key2: ‘value2}’.