Here is a reference sheet for anyone working with Vue.js. There are sample snippets of code to help quickly get started writing Vue.js code.
Note: This page is work in progress.
Create a new Vue.js Project with Vue CLI
Assuming that node and the Vue CLI is installed. Open the working directory in a terminal and enter:
This will open a new browser session and load the Vue Portal.
Build & Run a project
From the command line type:
npm run serve
This will output something similar to:
DONE Compiled successfully in 5427ms 16:06:27 App running at: - Local: http://localhost:8080/ - Network: http://192.168.0.26:8080/ Note that the development build is not optimized. To create a production build, run npm run build.
index.htm – this is the file that is served.
Create a new Vue instance
Call a method
Return a data property using this keyword
Create a link dynamically by using the v-bind directive.