vue-custom-element icon indicating copy to clipboard operation
vue-custom-element copied to clipboard

Possible to use actions and router using custom element?

Open sepharg opened this issue 4 years ago • 0 comments

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?

sepharg avatar Jul 31 '20 11:07 sepharg