- 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
推薦閱讀
- 極簡算法史:從數學到機器的故事
- Android和PHP開發最佳實踐(第2版)
- C語言程序設計習題解析與上機指導(第4版)
- Learning Docker
- HTML5+CSS3基礎開發教程(第2版)
- 小學生C++創意編程(視頻教學版)
- Mastering Android Development with Kotlin
- Multithreading in C# 5.0 Cookbook
- Raspberry Pi Robotic Projects(Third Edition)
- 代碼閱讀
- Swift High Performance
- Kotlin語言實例精解
- 循序漸進Vue.js 3前端開發實戰
- Apache Kafka 1.0 Cookbook
- Advanced C++