- 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.
推薦閱讀
- Learning LibGDX Game Development(Second Edition)
- The DevOps 2.3 Toolkit
- 一步一步學(xué)Spring Boot 2:微服務(wù)項目實戰(zhàn)
- 精通搜索分析
- RTC程序設(shè)計:實時音視頻權(quán)威指南
- Mastering Kali Linux for Web Penetration Testing
- 人人都懂設(shè)計模式:從生活中領(lǐng)悟設(shè)計模式(Python實現(xiàn))
- Functional Kotlin
- 自制編程語言
- ASP.NET程序設(shè)計教程
- 從零開始學(xué)C#
- Scala for Machine Learning(Second Edition)
- 少兒編程輕松學(xué)(全2冊)
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐
- Spring Boot從入門到實戰(zhàn)