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

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.

主站蜘蛛池模板: 沙洋县| 利辛县| 高邮市| 吴江市| 莆田市| 东明县| 万荣县| 吴桥县| 裕民县| 合江县| 当涂县| 巴林左旗| 望都县| 芦山县| 福建省| 乌兰察布市| 凤台县| 南华县| 吉林省| 安顺市| 香河县| 明水县| 海晏县| 辽源市| 东方市| 新和县| 晋城| 方城县| 温宿县| 称多县| 景洪市| 聊城市| 昭觉县| 定远县| 五台县| 和林格尔县| 波密县| 祁东县| 大埔区| 浏阳市| 岳普湖县|