Types: RouterOptions
ts
type RouterOptions: object;
Options to initialize a Router instance.
Type declaration
base?
ts
optional base: string;
Base path to be prepended to any URL. Can be used for Vue applications that run in nested folder for domain. For example having base
of /foo
would assume all routes should start with your.domain.com/foo
.
historyMode?
ts
optional historyMode: RouterHistoryMode;
Specifies the history mode for the router, such as "browser", "memory", or "hash".
Default
ts
"auto"
initialUrl?
ts
optional initialUrl: string;
Initial URL for the router to use. Required if using Node environment. Defaults to window.location when using browser.
Default
ts
window.location.toString()
prefetch?
ts
optional prefetch: PrefetchConfig;
Determines what assets are prefetched when router-link is rendered for a specific route
rejections?
ts
optional rejections: Partial<Record<string, Component>>;
Components assigned to each type of rejection your router supports.