What am trying to achieve is to pass data as props in my children components but this data is loaded from the server so it takes a while to load.
I would now like to
Use ,And load your child component after getting data like this
Here is the Nice and cleaner way to update child component.
var child = Vue.extend({
template: "Child Component : {{name}} Loading...",
props: ['name','loading']
});
var app = new Vue({
el: "#vue-instance",
data: {
name: "Niklesh",
loading: true
},
mounted() {
var vm = this;
setTimeout(function() {
vm.name = "Raut";
vm.loading = false;
}, 1000);
},
components: {
child
},
})