Blog

It's a Wonderful Life

Vue.js Events

What are Vue.js events

Difference between height, innerHeight and outerHeight

I was surprised to find there is no simple online comparison giving an overview of the difference between JQuery’s height, innerHeight and outerHeight. It’s really quite simple and is down to wheth...

.append(), prepend(), .after() and .before()

.append() puts data inside an element at last index and .prepend() puts the prepending elem at first index

Vue.js Components Communication

Components in Vue can communicate in various ways.

Vue, use a component inside another component

Say you have a Pixel component in src/components/Pixel.vue

Vue, how to use a prop as the class name

Say you have a Car component.

Stop event propagation with inline onclick attribute

Use event.stopPropagation().

The Vue Router

Introduction

Vue, how to use a v-model

The v-model Vue directive allows us to create a two-way binding.

Vue, why data must be a function

Using Vue you might surely asked yourself the question “why must data be a function that returns an object, and not just an object?”