Skip to content

Vue.js first steps

Charles de Beauchesne edited this page Apr 4, 2019 · 1 revision

Here is some usefull informations/links to help your first steps on Vue.js

Prerequisites

  • Installed node
  • Basic knowledge of HTML/Javascript
  • (Very) basic knowledge of bash/cmd command lines

Install

Vue CLI

We use the Vue CLI solution :

npm install -g @vue/cli

:info: -g stands for global, meaning that you will have to do it only once on your computer.

First project

vue create
npm run serve

❤️ : http://localhost:8080

Concepts

Components

State & Reactivity

  • What is a state ?
  • How reactivity works

Interpolations ...

... and binding

Style

  • Scoped, not scoped ?

Must knows

v-if/v-show

How to conditionally show/render a component ?

v-for

Render a list of component

v-bind

  • bind values to attributes
  • Shortand : :

v-on

  • Connect events
  • Shortand : @

v-model

Vue CLI

Links