Vue-router: beforeEnter next callback is not called

Created on 27 Jan 2019  路  2Comments  路  Source: vuejs/vue-router

Version

2.5.22

Reproduction link

https://jsfiddle.net/2ykhv8jq/

Steps to reproduce

Create a route with beforeEnter handler which calls next with a callback function.

In jsfiddle.net click the button and check the console.

What is expected?

"Am i called" and the vm should be present.

What is actually happening?

Line with "Am i called" is not present.


Code borrowed from https://github.com/vuejs/vue-router/issues/737#issuecomment-446565958

Most helpful comment

Is there a good reason for this? It's inconvenient!

All 2 comments

A callback is only supported in the in-component beforeRoutEnter guard.

Is there a good reason for this? It's inconvenient!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shinygang picture shinygang  路  3Comments

druppy picture druppy  路  3Comments

mitar picture mitar  路  3Comments

posva picture posva  路  3Comments

thomas-alrek picture thomas-alrek  路  3Comments