Skip to content

Commit e2aa66a

Browse files
committed
[docs] note about router.app
1 parent d919dff commit e2aa66a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/en/api/properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
- type: `Vue`
88

9-
The root Vue instance managed by the router instance. This instance is created from the Vue component contructor you passed into `router.start()`.
9+
The root Vue instance managed by the router instance. This instance is created from the Vue component contructor you passed into `router.start()`. Note it may not be synchronously available when if router has to perform a redirect on load. If you need access to `router.app` outside of your app components, you may want to do so inside the callback passed to `router.start()`.
1010

1111
### `router.mode`
1212

docs/en/api/start.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `router.start(App, el)`
1+
# `router.start(App, el, [callback])`
22

33
Start the router-enabled app. Creates an instance of `App` and mounts it to `el`.
44

@@ -14,3 +14,7 @@ Start the router-enabled app. Creates an instance of `App` and mounts it to `el`
1414
- `el: String|Element`
1515

1616
The element to mount the app on. Can be a CSS selector string or an actual element.
17+
18+
- `callback: Function` (optional)
19+
20+
A callback which will be called when the router app's initial render is complete. `router.app` is guaranteed to be available after this callback is called.

0 commit comments

Comments
 (0)