Vue uses the concept of directives; these are similar to Angular directives. Just like Angular, Vue provides a set of built-in directives.

The following is an example of how to bind a value to an element attribute using the built-in v-bind directive:

<!DOCTYPE html> 
<html lang="en"> 
    <meta charset="UTF-8"> 
    <title>Bind me!</title> 
    <!-- development version of Vue.js --> 
    <script src=""></script> 
<div id="app"> 
    <input type="text" v-bind:placeholder="defaultMessage"> 
<script type="text/javascript"> 
    let app = new Vue({ 
        el: '#app', 
        data: { 
            defaultMessage: 'Username' 

Another built-in directive, called v-if, allows us to conditionally ...

Get Learn TypeScript 3 by Building Web Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.