mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
Merge pull request #272 from cj/allow_router_mode_config
allow router mode to be set in config
This commit is contained in:
commit
5b61bd5872
@ -54,7 +54,7 @@ const scrollBehavior = (to, from, savedPosition) => {
|
||||
<% } %>
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
mode: '<%= router.mode %>',
|
||||
base: '<%= router.base %>',
|
||||
linkActiveClass: '<%= router.linkActiveClass %>',
|
||||
scrollBehavior,
|
||||
|
@ -172,6 +172,7 @@ function * generateRoutesAndFiles () {
|
||||
uniqBy: _.uniqBy,
|
||||
isDev: this.dev,
|
||||
router: {
|
||||
mode: this.options.router.mode,
|
||||
base: this.options.router.base,
|
||||
middleware: this.options.router.middleware,
|
||||
linkActiveClass: this.options.router.linkActiveClass,
|
||||
|
@ -36,6 +36,7 @@ class Nuxt {
|
||||
mode: 'out-in'
|
||||
},
|
||||
router: {
|
||||
mode: 'history',
|
||||
base: '/',
|
||||
middleware: [],
|
||||
linkActiveClass: 'nuxt-link-active',
|
||||
|
Loading…
Reference in New Issue
Block a user