Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

feat(nuxt): allow getRouteFromPath to use objects#5900

Merged
pi0 merged 3 commits intonuxt:mainfrom
TheColaber:feat/objects-router-commands
Aug 22, 2022
Merged

feat(nuxt): allow getRouteFromPath to use objects#5900
pi0 merged 3 commits intonuxt:mainfrom
TheColaber:feat/objects-router-commands

Conversation

@TheColaber
Copy link
Copy Markdown
Contributor

🔗 Linked issue

nuxt/nuxt#14170

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Allows the getRouteFromPath function to accept objects. I convert the object to a URL first by using the stringifyParsedURL in ufo and the code proceeds as normal. The playground has an example of a single-page app using an object to set the path, query, and hash. The issue is described in nuxt/nuxt#14170.

This is my first time playing around with something like this, so I know there will probably be many things that need to be changed or this being closed entirely.

Resolves nuxt/nuxt#14170

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 14, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit f524611
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6303a80b349ad4000b6b7189

Comment thread playground/app.vue Outdated
@pi0 pi0 requested a review from danielroe August 22, 2022 15:48
@pi0 pi0 changed the title feat: allow getRouteFromPath to use objects feat(nuxt): allow getRouteFromPath to use objects Aug 22, 2022
Copy link
Copy Markdown
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Nice enhancement! ❤️

@pi0 pi0 merged commit 9f1ecd1 into nuxt:main Aug 22, 2022
@pi0 pi0 mentioned this pull request Aug 26, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

universal router should still allow the use of objects

3 participants