Pass json object one component to another vuejs
问题 I'm new to vuejs I want to pass an JSON object to another component within same vue instance. following show the my code. from component add-user to component view-user. I tried vue props but it didn't work Thank you very much. Vue.component('view-users',{ props:['user'], template: '<span>{{ user.name }}</span>' }); Vue.component('add-user',{ data: function(){ return { user:{ name:'jhon', age:'29', } } } }); var app = new Vue({ el:'#app', }); <script src="https://cdnjs.cloudflare.com/ajax