- 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.
推薦閱讀
- 現代C++編程:從入門到實踐
- The DevOps 2.3 Toolkit
- Python 深度學習
- SEO智慧
- HTML5+CSS3網站設計教程
- Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
- SQL Server 2012數據庫管理與開發項目教程
- Hands-On Swift 5 Microservices Development
- Symfony2 Essentials
- Mastering Unity 2D Game Development(Second Edition)
- 編程改變生活:用Python提升你的能力(進階篇·微課視頻版)
- 分布式架構原理與實踐
- Python Web自動化測試設計與實現
- Python Social Media Analytics
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐