Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue.js 2 Web Development Projects

You're reading from   Vue.js 2 Web Development Projects Learn Vue.js by building 6 web apps

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781787127463
Length 398 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
CHAU GUILLAUME CHAU GUILLAUME
Author Profile Icon CHAU GUILLAUME
CHAU GUILLAUME
Arrow right icon
View More author details
Toc

One-minute setup

Without further ado, let's start creating our first Vue app with a very quick setup. Vue is flexible enough to be included in any web page with a simple script tag. Let's create a very simple web page that includes the library, with a simple div element and another script tag:

<html>
<head>
<meta charset="utf-8">
<title>Vue Project Guide setup</title>
</head>
<body>

<!-- Include the library in the page -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>

<!-- Some HTML -->
<div id="root">
<p>Is this an Hello world?</p>
</div>

<!-- Some JavaScript -->
<script>
console.log('Yes! We are using Vue version', Vue.version)
</script>

</body>
</html>

In the browser console, we should have something like this:

Yes! We are using Vue version 2.0.3

As you can see in the preceding code, the library exposes a Vue object that contains all the features we need to use it. We are now ready to go.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime