Skip to content

Commit c48f08e

Browse files
authored
Update application.md
1 parent 31b4521 commit c48f08e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/guide/essentials/application.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,29 +86,23 @@ Vue will automatically use the container's `innerHTML` as the template if the ro
8686
In-DOM templates are often used in applications that are [using Vue without a build step](/guide/quick-start.html#using-vue-from-cdn). They can also be used in conjunction with server-side frameworks, where the root template might be generated dynamically by the server.
8787

8888
## App Configurations {#app-configurations}
89-
9089
The application instance exposes a `.config` object that allows us to configure a few app-level options, for example, defining an app-level error handler that captures errors from all descendant components:
9190

9291
```js
9392
app.config.errorHandler = (err) => {
9493
/* handle error */
9594
}
9695
```
97-
9896
The application instance also provides a few methods for registering app-scoped assets. For example, registering a component:
99-
10097
```js
10198
app.component('TodoDeleteButton', TodoDeleteButton)
10299
```
103-
104100
This makes the `TodoDeleteButton` available for use anywhere in our app. We will discuss registration for components and other types of assets in later sections of the guide. You can also browse the full list of application instance APIs in its [API reference](/api/application).
105101

106102
Make sure to apply all app configurations before mounting the app!
107103

108104
## Multiple application instances {#multiple-application-instances}
109-
110105
You are not limited to a single application instance on the same page. The `createApp` API allows multiple Vue applications to co-exist on the same page, each with its own scope for configuration and global assets:
111-
112106
```js
113107
const app1 = createApp({
114108
/* ... */
@@ -120,5 +114,4 @@ const app2 = createApp({
120114
})
121115
app2.mount('#container-2')
122116
```
123-
124117
If you are using Vue to enhance server-rendered HTML and only need Vue to control specific parts of a large page, avoid mounting a single Vue application instance on the entire page. Instead, create multiple small application instances and mount them on the elements they are responsible for.

0 commit comments

Comments
 (0)