Skip to content

How to integrate nprogress with router? #549

Answered by recallwei
taskindrp asked this question in Q&A
Discussion options

You must be logged in to vote

Only the path changed should display loading.

router.subscribe('onBeforeLoad', ({ pathChanged }) => pathChanged && nprogress.start())
router.subscribe('onLoad', () => nprogress.done())

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@marten
Comment options

Answer selected by taskindrp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants