Understanding the Project Structure

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

Alright, so now that we have set up our project, let’s actually see what it looks like. First, let’s open up the “package.json” file, which describes the project’s dependencies. { “name”: “sample-project”, “description”: “A Vue.js project”, “version”: “1.0.0”, “author”: “Bo Andersen “, “private”: true, “scripts”: { “dev”: “cross-env NODE_ENV=development webpack-dev-server –open –hot”, “build”: “cross-env NODE_ENV=production… read more

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