[Vuejs]-Pass string to nested vue component and access it in nested component

0๐Ÿ‘

โœ…

I have resolved it as follows,

<template>
  <input type="text" v-model="category">
</template>

<script>
export default {
name: "ProductsByCategory",
  props: {
  category: {
    type: String,
  }
  }
}
</script>

<style scoped>

</style>

reference: How to access data from deeply nested child components in Vue.js

Leave a comment