Skip to content

docs: explain per-route guards on nested routes #2130

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

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

skirtles-code
Copy link
Contributor

While working on #2127, I had originally intended to include a note about per-route guards, but the specific functionality I was trying to reference doesn't appear to be documented, so I left it out.

This PR attempts to address that.

Specifically, when using nested routes, the beforeEnter per-route guard can be placed on either the parent or the child route. There is some subtlety to exactly when those guards will be called, which I believe is intentional and worth documenting.

I've also moved the final paragraph of that section into a tip. The new content about nested routes left that final paragraph feeling like a strange jump to a separate topic, and I think the tip box makes that less confusing.

Copy link

netlify bot commented Feb 6, 2024

Deploy Preview for vue-router ready!

Name Link
🔨 Latest commit 46eeec5
🔍 Latest deploy log https://app.netlify.com/sites/vue-router/deploys/65c1cc9334d73b000768e555
😎 Deploy Preview https://deploy-preview-2130--vue-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks a lot!

@posva posva merged commit 3025e82 into vuejs:main Feb 6, 2024
niceplugin added a commit to niceplugin/Vuejs-Router-KO that referenced this pull request Feb 12, 2024
niceplugin added a commit to niceplugin/Vuejs-Router-KO that referenced this pull request Feb 12, 2024
* docs: omitting parent components for nested routes (vuejs#2127)

* docs: explain per-route guards on nested routes (vuejs#2130)

* "경로"를 "라우트"로 단어 일괄 변경
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

Successfully merging this pull request may close these issues.

2 participants