- 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
推薦閱讀
- Maven Build Customization
- 深入實(shí)踐Spring Boot
- JIRA 7 Administration Cookbook(Second Edition)
- AIRAndroid應(yīng)用開發(fā)實(shí)戰(zhàn)
- 營銷數(shù)據(jù)科學(xué):用R和Python進(jìn)行預(yù)測分析的建模技術(shù)
- R的極客理想:工具篇
- AIRIOT物聯(lián)網(wǎng)平臺(tái)開發(fā)框架應(yīng)用與實(shí)戰(zhàn)
- Python High Performance Programming
- 大學(xué)計(jì)算機(jī)基礎(chǔ)
- Java Hibernate Cookbook
- 計(jì)算語言學(xué)導(dǎo)論
- Java高級(jí)程序設(shè)計(jì)
- Mastering ASP.NET Web API
- Learning Dynamics NAV Patterns
- Game Development Patterns and Best Practices