- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 82字
- 2021-07-02 19:57:13
Templates
By default, Vue will use an HTML file for its template. An included script will declare an instance of Vue and use theelproperty in the configuration object to tell Vue where in the template the app will be mounted:
<p id="app"> <!--Vue has dominion within this node--> </p> <script> new Vue({ el: '#app' }); </script>
We can bind data to our template by creating it as adataproperty and using the mustache syntax to print it in the page:
<p id="app"> {{ message }} <!--Renders as "Hello World"--> </p> <script> new Vue({ el: '#app', data: { message: 'Hello World' } }); </script>
推薦閱讀
- Node.js Design Patterns
- Delphi程序設計基礎:教程、實驗、習題
- Learning RabbitMQ
- Java游戲服務器架構實戰
- MATLAB實用教程
- 手把手教你學C語言
- Mastering Elasticsearch(Second Edition)
- Django Design Patterns and Best Practices
- Docker:容器與容器云(第2版)
- Mastering Machine Learning with R
- Java編程指南:語法基礎、面向對象、函數式編程與項目實戰
- 美麗洞察力:從化妝品行業看顧客需求洞察
- Serverless工程實踐:從入門到進階
- 微信公眾平臺開發最佳實踐
- VMware vRealize Orchestrator Essentials