- Vue.js 2.x by Example
- Mike Street
- 121字
- 2021-07-02 20:00:24
Creating the workspace
To use Vue, we first need to include the library in our HTML and initialize it. For the examples in the first section of this book, we are going to be building our application in a single HTML page. This means the JavaScript to initialize and control Vue will be placed at the bottom of our page. This will keep all our code contained, and means it will easily run on your computer. Open your favorite text editor and create a new HTML page. Use the following template as a starting point:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue.js App</title>
</head>
<body>
<p id="app">
</p>
<script src="https://unpkg.com/vue"></script>
<script type="text/javascript">
// JS Code here
</script>
</body>
</html>
The main HTML tags and structure should be familiar to you. Let's run over a few of the other aspects.
推薦閱讀
- Debian 7:System Administration Best Practices
- HTML5+CSS3基礎(chǔ)開(kāi)發(fā)教程(第2版)
- 程序員考試案例梳理、真題透解與強(qiáng)化訓(xùn)練
- Java虛擬機(jī)字節(jié)碼:從入門(mén)到實(shí)戰(zhàn)
- 云計(jì)算通俗講義(第3版)
- 老“碼”識(shí)途
- Python程序設(shè)計(jì)
- 深入理解Elasticsearch(原書(shū)第3版)
- Creating Mobile Apps with jQuery Mobile(Second Edition)
- Android移動(dòng)開(kāi)發(fā)案例教程:基于Android Studio開(kāi)發(fā)環(huán)境
- Spring+Spring MVC+MyBatis從零開(kāi)始學(xué)
- Visual Basic程序設(shè)計(jì)(第三版)
- RubyMotion iOS Develoment Essentials
- Building Slack Bots
- 深入理解Kafka:核心設(shè)計(jì)與實(shí)踐原理