I would like to use Vue.js to populate the DOM with fetched data from a third party API (that being said I don’t have control over the API). The Vue function calls and returns the data needed and it also creates the correct amount of html divs. But the issue is that there is no data forwarded to those html/p
Tag: vue.js
Unable to require() a variable path from props in VueJS
I am sending data – a URL to a local image file, from parent to child, and when I load it in child component’s it shows an error, but if I directly load it, it works. Code: In parent.vue component’s data: In child.vue component’s mounted() And console.log(this.item.src) gives exactly the same string, so the child is actually getting the data
Vue CLI – combine build output to a single html file
I have a vue project created with vue-cli. The normal output when running yarn build is a dist folder with an index.html and a js and css sub-directory with the corresponding .js and .css files. I want the build output to be a single html file that contains the js and css. I added a vue.config.js file in the root
Control webpack verbosity when programmatically starting vue-cli-service serve
I’m trying to run vue-cli-service serve from inside a Node.js application like this: And it works. But when I do it in production mode (change service.init(“development”) to service.init(“production”)), I don’t see the webpack “building” progress anymore. Hence my question: how to start a Vue server in production mode, but keep webpack progress printed to the console? Answer Progress is reported
Vue Component Props only available on $vnode
I’m new to the World of Vue.js and I have to build a recursive Component renderer that turns JSON into rendered Vue components. So far the recursive rendering works just fine, except for the props I’m passing to the createElement function (code below 😉 ) is not available as props, but inside the $vnode.data object. Any ideas what I’m missing?
dynamically render vue template
I have vue template data as string. For example, String s = “<div>{{myData}}</div>” And now I want to render in my already defined vue component. Now I want the output as IRONMAN How can i achieve this? Pleas help. Thanks Answer You can have a single file component and do this – I have one called Dynamic.vue which accepts a
NavigationDuplicated Navigating to current location (“/search”) is not allowed
When I want to do a search multiple times it shows me the NavigationDuplicated error. My search is in the navbar and the way I have configured the search is to take the value using a model and then pass the value as a parameter to the ContentSearched component, and then receive the value of the search in that component.
Clearing an array content and reactivity issues using Vue.js
A few years ago it was bad practice to do because if the array was referenced somewhere that reference wasn’t updated or something like that. The correct way was supposed to be array.length = 0; Anyway, JavaScript has been updated now, and there’s a framework called Vue.js Vue does not catch array.length = 0; so the property won’t be reactive.
Why WebStorm show errors in gql query inside apollo object in Vue component or .grapgql files
I have a problem with WebStorm syntax highlighting. I created valid GraphQL query which works on localhost app but WebStorm says that unknown field “familyMembers” on object type “Query” and highlights the whole query in red. I am really confused but maybe I should change something inside apollo.config.js – if yes please tell me what. HelloWorld.vue apollo.config.js Some screenshots: Answer
is There an easy way to get all data from vuejs?
I have this data’s is there a way to get all of these? already tried this._data.forEach but it is not working thanks! Answer Vue uses underscore as a prefix for its internal properties. You should avoid using them. The data object for an instance is accessible via the $data property. https://v2.vuejs.org/v2/api/#vm-data So within an instance you can get that object