How to add external JS scripts to VueJS Components?

I’ve to use two external scripts for the payment gateways. Right now both are put in the index.html file. However, I don’t want to load these files at the beginning itself. The payment gateway is needed only in when user open a specific component (using router-view). Is there anyway to achieve this? Thanks. 17 Answers … Read more

How to listen for ‘props’ changes

In the VueJs 2.0 docs I can’t find any hooks that would listen on props changes. Does VueJs have such hooks like onPropsUpdated() or similar? Update As @wostex suggested, I tried to watch my property but nothing changed. Then I realized that I’ve got a special case: <template> <child :my-prop=”myProp”></child> </template> <script> export default { … Read more

Vue.js – How to properly watch for nested data

I’m trying to understand how to properly watch for some prop variation. I have a parent component (.vue files) that receive data from an ajax call, put the data inside an object and use it to render some child component through a v-for directive, below a simplification of my implementation: <template> <div> <player v-for=”(item, key, … Read more