- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 93字
- 2021-07-02 19:57:17
Installing Vue.js
Now it's time to add the Vue.js library to our project. Vue was downloaded as part of our NPM install, so now we can simply link to the browser-build of Vue.js with ascripttag.
index.html:
<body> <p id="toolbar">...</p> <p id="app">...</p> <script src="node_modules/vue/dist/vue.js"></script> <script src="app.js"></script> </body>
It's important that we include the Vue librarybeforeour own customapp.jsscript, as scripts run sequentially.
Vue will now be registered as a global object. We can test this by going to our browser and typing the following in the JavaScript console:
console.log(Vue);
Here is the result:

Figure 2.3. Checking Vue is registered as a global object
推薦閱讀
- Bulma必知必會
- 數據結構習題精解(C語言實現+微課視頻)
- Hands-On C++ Game Animation Programming
- TypeScript項目開發實戰
- Unity 5 for Android Essentials
- Angular開發入門與實戰
- 第一行代碼 C語言(視頻講解版)
- Java Web開發就該這樣學
- Visual Basic 6.0程序設計實驗教程
- Swift語言實戰晉級
- Orchestrating Docker
- Distributed Computing in Java 9
- C++ System Programming Cookbook
- Instant Apache Camel Messaging System
- 計算機應用基礎(Windows 7+Office 2010)