Comments (11)
Thanks for spotting this. It seems there's something missing in the description.
from routify.dev.
IIRC the behavior is the same as described here.
https://v3.ci.routify.dev/docs#guide/introduction/parameters
from routify.dev.
Yes, in the V3 documentation this is made way clearer! :)
from routify.dev.
Thing to be noted tho, during my tests i tryed a usage like "/subfolder/page/:id", while having a fallback page configured at root level in my folder structure, and instead of hitting the "/subfolder/page" with param { page: id }, it was going straight to the root level fallback.
It only worked as intended when i configured it to use only URLSearchParams
from routify.dev.
That sounds like a bug. Can you create a minimal reproducible?
from routify.dev.
So i tryed to go back and reproduce the behaviour i stated above, but it turns out i was missing the Syntactical sugar
section of the V3 documentation, where i should name my destination file wrapped in [ ]
to have it work as a path parameter.
No bug in here, just a problem between the chair and the screen.
Thank you for your patience, i hope my feedback can help you make V2 documentation clearer for future use.
from routify.dev.
I'm not sure this is the right channel, but since i'm in the topic and it could potentially be a new issue, i'm going to introduce it here.
Should it be possible to use path parameters like "/subfolder/page/:id" together with named routes in a $goto helper?
$goto('tools.show', {tool: id})
with file named [tool].svelte
From what i'm testing now, it correctly writes the intended path in the browser history, but routify appears to be routing me back to the "/subfolder/index", by visiting the same url via the $url helper inside a link, or with the "back" browser button i reach correctly the intended page
from routify.dev.
@gianmarco27 I'm not sure I follow. Could you give me a step by step of what you're doing, what's happening and what you're expecting?
from routify.dev.
Upon a form submission, i'm trying to redirect to a success page which should contain the submitted informations.
So i have setup a $goto
on success to the page which is named like [id].svelte
.
this page contains <!-- routify:options name="tools.show" -->
and i'm calling $goto('tools.show', {id: slug_number})
I would expect to be redirect to such page on success, what happens instead is i get navigated to such page, and then redirect to the same-level index.svelte file.
if i browse back with the "back" arrow from the browser i land on the [id].svelte page correctly at the url foldername/slug_number.
I tryed creating a reproducible to show you from the starter template but i am unable to reproduce the same ux flow.
I should investigate further my project to understand what is causing the double navigation.
is this type of usage $goto('tools.show', {id: slug_number})
supposed to work and route me to foldername/slug_number
?
Thank you for your time
from routify.dev.
I would have expected that to work. Are you using Routify 2?
from routify.dev.
Yes i'm using 2.18.8
After all turns out it was again a problem on my side.
After the $goto call, more code from the originating page was still being executed causing the weird behaviour
from routify.dev.
Related Issues (20)
- Chevron animation HOT 2
- Fix scoped prop doc
- Improve docs for Routify options
- A typo on the build configuration docs page
- basepath: Docs never explain what it actually is HOT 2
- `routify export` seems completely undocumented? HOT 2
- 'Get Started' button on home page throws and error HOT 5
- Website performance HOT 5
- Spelling error: SSR & SSG documentation section HOT 1
- Migrating to 2.x guide missing information on Routify rollup plugin is now an object HOT 1
- Migrating to 2.x guide missing information on Routify rollup.config.js changes. HOT 3
- $goto docs are out of date HOT 1
- routify.dev loop switching between 1.x and 2.x HOT 3
- What is `scroll` config means? HOT 1
- Unused step in use tailwind css docs HOT 4
- Documentation - $afterPageLoad (callback) requires a return value of boolean, but doc does not state so
- Starter Template Documentation
- Update install command for making new routify project HOT 1
- How to use component based manual route instead of file system HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from routify.dev.