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

Application space

This is the container for your application and provides a canvas for Vue to work in. All the Vue code will be placed within this tag. The actual tag can be any HTML element - mainsection, and so on. The ID of the element needs to be unique, but again, can be anything you wish. This allows you to have multiple Vue instances on one page or identify which Vue instance relates to which Vue code:

      <p id="app">
</p>

During the tutorials, this element with the ID will be referred to as the app space or view. It should be noted that all HTML and tags and code for your application should be placed within this container.

Although you can use most HTML tags for your application space, you cannot initialize Vue on the <body> or <HTML> tags - if you do so, Vue will throw a JavaScript error and will fail to initialize. You will have to use an element inside your body.

主站蜘蛛池模板: 张家港市| 广州市| 白朗县| 巴彦淖尔市| 车致| 三原县| 怀仁县| 秦皇岛市| 安福县| 永嘉县| 天镇县| 黄陵县| 从江县| 罗定市| 黑河市| 比如县| 临澧县| 凌海市| 大姚县| 肇东市| 太谷县| 新野县| 加查县| 铜鼓县| 太康县| 平乡县| 宁陵县| 东乡族自治县| 望谟县| 清河县| 惠东县| 宁陕县| 贵德县| 错那县| 禄丰县| 临湘市| 华阴市| 贡山| 龙游县| 阳曲县| 乌苏市|