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

How to use vue router to redirect to a file #3092

Closed
MattixNow opened this issue Jan 8, 2020 · 4 comments
Closed

How to use vue router to redirect to a file #3092

MattixNow opened this issue Jan 8, 2020 · 4 comments

Comments

@MattixNow
Copy link

@MattixNow MattixNow commented Jan 8, 2020

How to use vue router to redirect to a file.
I want to redirect the user to a pdf file from the '/cv' location. I've tried

extendRoutes(routes, resolve) {
      routes.push({
        path: "/CV.pdf",
        name:'cv',
      });
    },

Can somebody help me ?

@vue-bot

This comment has been minimized.

Copy link

@vue-bot vue-bot commented Jan 8, 2020

Hello, thank you for taking time filling this issue!

However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).

I hope to see your helper-created issue very soon!

@vue-bot vue-bot closed this Jan 8, 2020
@LinusBorg

This comment has been minimized.

Copy link
Member

@LinusBorg LinusBorg commented Jan 8, 2020

just use a plain anchor tag ?

@MattixNow

This comment has been minimized.

Copy link
Author

@MattixNow MattixNow commented Jan 9, 2020

@LinusBorg Yes I can do this but if my visitors wants to directly be redirected to my resume..

@LinusBorg

This comment has been minimized.

Copy link
Member

@LinusBorg LinusBorg commented Jan 9, 2020

Then programmatically set window.location.

The router's job is to route between frontend components on the client side. It doesn't and shouldn't care about links to any kind of asset located on the server side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.