4 years ago

Vue.js acces parent methods

Posted 4 years ago by perkola

I have a Vue object tied to a div and within that div i have a component. From the component I want to access methods of the parent. The child component contains buttons with handlers that should call methods from the parent.

<div id="parent">

I've found out that the parent can be accessed via vm.$parent but when i try to call a method like vm.$parent.someParentMethod() I get undefined... Any tips?

Please sign in or create an account to participate in this conversation.