Does from variable in the VueJS router's beforeEach show external URLs or just url local to application

Viewed 147

router.beforeEach(async (to, from, next)

I would like to capture the external referring page (page that they were on before clicking a link to my page); I have a SPA VueJS application.

Hard to test without pushing live.

I attempted to use the from variable in the beforeEachEnter within the component (push it live) and only got a "/" as the form value

Then I thought maybe go to my main.js and get from variable out of: router.beforeEach(async (to, from, next)

Or does anyone know another way to essential get the equivalent of req.header.referer when using VueJS --- let's say I want to display the referring URL to user or send to backend upon submittal of the form created with VueJS

0 Answers
Related