[Vuejs]-How to pass array data between two routes in Vuejs

0👍

If you replace <router-link to="/post/:cart">Check out</router-link> with <router-link to="/post/test">Check out</router-link> you will see test in the console. This is because using :cart you declared a placeholder for the parameter “cart” in the redirect.

If you want to pass more params I think that you can try
somethink similar to <router-link :to="{ path: '/post/', params: { a: 'a', b: 'b', c: 'c' }}">Check out</router-link> but probably you need to change your route.js removing :cart

Leave a comment