I am attempting to utilize the $router.push method in order to transfer data from one view to another. Below is an excerpt of the code:
let obj = {
foo: 'f1',
foo2: ['f2'],
foo3: {
foo4: [],
foo5: new Map(),
foo6(){ ... }
}
}
Requesting push at the router:
this.$router.push({
name: 'foo',
params: { id: this.id, data: this.obj }
})
The first parameter works fine as it is an integer, but the second parameter returns the string: "[Object Object]"
Does the router support this type of action? If so, how can I achieve this?
What approach would be the most effective for this type of communication?
PS: I am monitoring the router state change using watch