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

  • Vue.js 2.x by Example
  • Mike Street
  • 163字
  • 2021-07-02 20:00:24

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.

主站蜘蛛池模板: 海安县| 集贤县| 长岛县| 周至县| 沭阳县| 团风县| 枣阳市| 义马市| 利辛县| 正蓝旗| 深水埗区| 石景山区| 无极县| 临汾市| 平遥县| 正安县| 睢宁县| 富平县| 淅川县| 互助| 荃湾区| 荥阳市| 凉城县| 普宁市| 呼玛县| 嘉鱼县| 贡嘎县| 寿光市| 工布江达县| 大悟县| 富宁县| 依安县| 原阳县| 特克斯县| 阳东县| 绵阳市| 陕西省| 堆龙德庆县| 大同市| 武冈市| 阿巴嘎旗|