官术网_书友最值得收藏!

Creating the workspace

To use Vue, we first need to include the library in our HTML and initialize it. For the examples in the first section of this book, we are going to be building our application in a single HTML page. This means the JavaScript to initialize and control Vue will be placed at the bottom of our page. This will keep all our code contained, and means it will easily run on your computer. Open your favorite text editor and create a new HTML page. Use the following template as a starting point:

      <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue.js App</title>
</head>
<body>
<p id="app">
</p>
<script src="https://unpkg.com/vue"></script>
<script type="text/javascript">
// JS Code here
</script>
</body>
</html>

The main HTML tags and structure should be familiar to you. Let's run over a few of the other aspects.

主站蜘蛛池模板: 工布江达县| 玉山县| 沈丘县| 洪湖市| 会昌县| 普兰县| 囊谦县| 茌平县| 伊吾县| 马关县| 哈巴河县| 桐城市| 醴陵市| 遂宁市| 林周县| 印江| 秦皇岛市| 无为县| 米易县| 镇坪县| 任丘市| 陈巴尔虎旗| 微山县| 靖江市| 紫云| 白银市| 扶风县| 荃湾区| 昆明市| 茂名市| 东宁县| 肇源县| 德惠市| 宜良县| 扎鲁特旗| 米泉市| 宜昌市| 伊通| 商丘市| 成武县| 丹凤县|