Skip to content

Commit

Permalink
Reword the section on in-DOM root templates (#1314)
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-es committed May 2, 2023
1 parent 5b7c079 commit de65961
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/guide/essentials/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ app.mount('#app')

### DOM 内のルートコンポーネントテンプレート {#in-dom-root-component-template}

ビルドをしないで Vue を扱う場合、ルートコンポーネントのテンプレートをマウントコンテナ内に直接書くことができます:
通常、ルートコンポーネントのテンプレートはコンポーネント自体の一部ですが、マウントコンテナー内に直接記述することで、テンプレートを別途提供することもできます:

```html
<div id="app">
Expand All @@ -83,6 +83,8 @@ app.mount('#app')

もしルートコンポーネントに `template` オプションがすでにない場合、Vue は自動的にコンテナの `innerHTML` をテンプレートとして使用します。

DOM 内テンプレートは、[ビルドステップなしで Vue を使用する](/guide/quick-start.html#using-vue-from-cdn)アプリケーションでよく使用されます。また、ルートテンプレートがサーバーによって動的に生成される、サーバーサイドフレームワークと組み合わせて使用することもできます。

## アプリの設定 {#app-configurations}

アプリケーションのインスタンスは、`.config` オブジェクトを公開し、いくつかのアプリケーションレベルのオプションを設定することができます。たとえば、すべての子孫コンポーネントから発生したエラーを捕捉するアプリケーションレベルのエラーハンドラーを定義するには次のとおりです:
Expand Down

1 comment on commit de65961

@vercel
Copy link

@vercel vercel bot commented on de65961 May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.