Vue.js

Accessing the DOM in Vue.js with $refs

April 23, 2017 by
Part 40 of 55 in the Vue.js: From Beginner to Professional series

It’s time to take a closer look at a few more special Vue instance properties and methods, with the first one being the $refs property. But before diving into the JavaScript part of things, let’s start by taking a look at the template. <div id=”app”> <h1>{{ message }}</h1> <button @click=”clickedButton”>Click Me!</button> </div> var vm =… read more