[Vuejs]-How to pass data on the main Vue instance to components used by vue-router?

0👍

Your component now is a child component of your main instance and cannot access the parents properties directly. However, there are several ways to do that.

For your simple use case it is fine to access the parent via this.$parent or just $parent in a template.

For more complex apps this approach quickly become impossible to maintain and you should take a look at vuex.

Leave a comment