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

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.

主站蜘蛛池模板: 信丰县| 保亭| 湖北省| 蕉岭县| 扬州市| 商南县| 沁源县| 宁国市| 梨树县| 仲巴县| 彭阳县| 峡江县| 济阳县| 平顶山市| 都兰县| 航空| 肇东市| 和硕县| 资中县| 筠连县| 中方县| 娄烦县| 普定县| 松阳县| 岢岚县| 桃园市| 邢台县| 秦安县| 德庆县| 格尔木市| 霍邱县| 嘉禾县| 吴旗县| 永和县| 连云港市| 名山县| 禹州市| 平乐县| 文安县| 涡阳县| 武安市|