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

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

Merged
pi0 merged 3 commits into
nuxt:mainfrom
danielgallab:feat/objects-router-commands
Aug 22, 2022
Merged

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

Conversation

@danielgallab

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.

Resolvesnuxt/nuxt#14170

📝 Checklist

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

@netlify

netlifyBot commented Jul 14, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitf524611
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6303a80b349ad4000b6b7189

Comment threadplayground/app.vue Outdated
@pi0
pi0 requested a review from danielroeAugust 22, 2022 15:48
@pi0pi0 changed the title feat: allow getRouteFromPath to use objectsfeat(nuxt): allow getRouteFromPath to use objectsAug 22, 2022

@danielroedanielroe left a comment

Copy link
Copy Markdown
Member

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:mainAug 22, 2022
@pi0pi0 mentioned this pull request Aug 26, 2022
Sign up for freeto 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

@danielgallab@pi0@danielroe