[Vuejs]-Passing user input to another component in vue.js

0👍

You should save the value of getUser in your data, and then you can pass that to your app-area component.

data: {
  users: 0
}
methods:{
getUsers(){
  @users = 2;
}

And then in your html:

<app-area v-if="users > 0 && users < 5" v-bind:users="users"></app-area>

Now your app-area template has access to users. So you can pass each user to userCard component

<userCards v-for="user in users" v-bind:user="user"></userCards>

Leave a comment