<template>
<div class="col s4">
<a class="collection-header"><h4>Rooms List</h4></a>
<ul id = "rooms-list" class="collection">
<li v-for="(room, index) in rooms" :key="index" @click="myMethod(room)">{{room}}</li>
</ul>
</div>
</template>
<script>
export default {
name: 'qqqq',
data() {
return {
rooms: [
'room1',
'room2',
'room3',
'room4',
]
}
},
methods: {
addRoom(name) {
this.rooms.push(name);
}
}
}
</script>