Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing #13

Closed
Dysey opened this issue Apr 16, 2022 · 1 comment
Closed

Routing #13

Dysey opened this issue Apr 16, 2022 · 1 comment

Comments

@Dysey
Copy link

Dysey commented Apr 16, 2022

Hi,

I install vue-router and try in createWindow to change the loadFile like that

updateWindow.loadFile(Path.join(app.getAppPath(), 'renderer', 'index.html#splash'));

But got an error
Not allowed to load local resource: file:///C:/laragon/www/temp/dist/win-unpacked/resources/app.asar/renderer/index.html%23splash

How I create Router

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;

Some help pls :) thx a lot

@Deluze
Copy link
Owner

Deluze commented Apr 16, 2022

This error you're getting has nothing to do with VueRouter itself.

You're trying to load in an index.html file with an anchor included. That's impossible.

You want to do something like:

updateWindow.loadFile(Path.join(app.getAppPath(), 'renderer', 'index.html'),  { hash: 'splash' });

@Deluze Deluze closed this as completed Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants