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

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

Merged
merged 3 commits into from
Aug 22, 2022

Conversation

TheColaber
Copy link
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

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

playground/app.vue Outdated Show resolved Hide resolved
@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
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