- 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>
推薦閱讀
- Java程序設計(慕課版)
- FuelPHP Application Development Blueprints
- Objective-C Memory Management Essentials
- 大學計算機基礎實驗教程
- Java高手真經(高級編程卷):Java Web高級開發技術
- Learning Python Design Patterns(Second Edition)
- 匯編語言程序設計(第3版)
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- BeagleBone Black Cookbook
- R語言與網絡輿情處理
- CRYENGINE Game Development Blueprints
- 單片機原理及應用技術
- 大學計算機基礎實驗指導
- Python硬件編程實戰
- 現代CPU性能分析與優化