vue-custom-element
vue-custom-element copied to clipboard
Possible to use actions and router using custom element?
I´m trying to reuse a component that makes calls to the router i.e:
this.$route.params;
and I get an undefined when packing it into a vue-custom-element same thing happens for actions, i´m getting errors like
Error in mounted hook: "TypeError: Cannot read property 'params' of undefined"
or
TypeError: Cannot read property 'commit' of undefined
Any thoughts on this? Do i need to do something else in order to call $route in Vue, or define something when injecting Vuex context variables?