TextEditor

The rawest way to be up and running is with a text editor and a browser. This is totally legitimate for simple, self contained components.

There are plenty of text editors from which to choose these days. One I like to use is Microsoft Visual Studio Code (https://github.com/Microsoft/vscode). There is little difference if you use another, is just so happens that Code has a plugin for Vue:

  1. Create a new file called myapp.html, in which we write:
        <!DOCTYPE html>         <html>           <head>             <title>Vue.js app</title>           </head>           <body>             <div id="app">               {{'hello world'}}             </div>             <script               src="https://cdnjs.cloudflare.com/ajax               /libs/vue/2.0.0/vue.js">            </script>             <script>               new Vue({el:'#app'})             </script>           </body>         </html>
  1. Open the file you just ...

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.