-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
I'm trying to use vue-router
with electron.js
to make a desktop app, I currently have these routes
import Home from './views/Home/Home.vue';
export default [
// Home Routes
{ path: '', name: 'home', component: Home },
{ path: '/', name: 'home', component: Home },
{ path: '*', redirect: '/' }
]
Currently when the program loads, window.location.pathname
is something like /Users/name/appname/app/views/index.html'
which doesn't match ANY of my paths, so I use a path: '*', redirect: '/'
to send it to the home page on initial load.
I feel like there should be a better way to set a default route on initial load, is there nothing like
<router-view default="{name: 'home'}"></router-view>
or something
phrxst, witzawitz, illsio, semihcosu, inman-sebastian and 5 more
Metadata
Metadata
Assignees
Labels
No labels