Vue JS CheatSheet
Vue JS CheatSheet
CHEAT SHEET
EXPRESSIONS BINDING
<div id="app"> <a v-bind:href="url">...</a>
<p>I have a {{ product }}</p>
<p>{{ product + 's' }}</p> shorthand <a :href="url">...</a>
<p>{{ isWorking ? 'YES' : 'NO' }}</p>
<p>{{ product.getSalePrice() }}</p> True or false will add or remove attribute:
</div>
<button :disabled="isButtonDisabled”>...
To access the position in the array: .self Only trigger if event.target is element itself
Mouse modifiers:
Vue Router
Inside button-counter template:
Navigation for a Single-Page Application.
Custom event name
Vue DevTools
this.$emit('incrementBy', 5) Data sent up to parent
Browser extension for debugging Vue applications.
Nuxt.js
Library for server side rendering, code-splitting, hot-re-
loading, static generation and more.