vue div id get div information

Solutions on MaxInterview for vue div id get div information by the best coders in the world

showing results for - "vue div id get div information"
Lara
09 May 2016
1 var app = new Vue({
2    el:'#app',
3    methods: {    
4        showMyDiv() {
5           console.log(this.$refs.myDiv);
6        }
7    }
8    
9   });
10<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
11<div id='app'>
12   <div id="myDiv" ref="myDiv"></div>
13   <button v-on:click="showMyDiv" >Show My Div</button>
14</div>