- Vue.js 2 Web Development Projects
- Guillaume Chau
- 116字
- 2021-07-02 22:34:23
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 p 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 -->
<p id="root">
<p>Is this an Hello world?</p>
</p>
<!-- 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.
推薦閱讀
- 數(shù)據(jù)庫原理及應(yīng)用(Access版)第3版
- C語言程序設(shè)計(jì)習(xí)題解析與上機(jī)指導(dǎo)(第4版)
- 零起步玩轉(zhuǎn)掌控板與Mind+
- Java 9 Programming Blueprints
- Mastering Python Scripting for System Administrators
- Python高效開發(fā)實(shí)戰(zhàn):Django、Tornado、Flask、Twisted(第2版)
- SQL Server從入門到精通(第3版)
- 前端HTML+CSS修煉之道(視頻同步+直播)
- 快人一步:系統(tǒng)性能提高之道
- Python Data Structures and Algorithms
- Julia for Data Science
- Qt5 C++ GUI Programming Cookbook
- 運(yùn)維前線:一線運(yùn)維專家的運(yùn)維方法、技巧與實(shí)踐
- Java程序設(shè)計(jì)與項(xiàng)目案例教程
- Web開發(fā)新體驗(yàn)