Created
June 20, 2021 09:11
-
-
Save titusdecali/91065300deab212e25cd91cc2df74cea to your computer and use it in GitHub Desktop.
Vue: Access parent's data from child with $refs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parent.vue | |
<template> | |
<ChildComponent ref="child" /> | |
</template> | |
// In Parent.vue's methods | |
this.$refs.child.methodName() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment