[Vuejs]-Vue.js pasing object to orher components

0👍

Create an object variable obj1 in the Master page(You can create this variable at the top of head section so that it is available before any script runs). You can access this variable from any component you want. Let’s say you want to store an object obj2 from the component. In your component store obj2 like this —

obj1.obj2 = obj2;

From any other component you can access it using obj1.obj2

Leave a comment