Closed arichter83 closed 5 years ago
Hello @arichter83 ,
/:partner/:partnerName?
pathRegExp
is editable by default — see docs, and addressed in #25, asn solver in #28 by @nicoopratAlthough I've merged your PR, now thinking — are we really want to publish such changes? Waiting for your opinion @arichter83
Dear @dr-dimitru,
the PR was just the |
and I think it is optional to merge and no need to publish. I didn't know about the overriding!
And in regards to the sticky_field
, that was just a draft. But /:partner/:partnerName?
is no solution - /:partner(one|two|three)?
means /
, /one
, /two
or /three
.
Okay, going to revert latest merge. Please, feel free to use pathRegExp
to meet your needs 😉
Feel free to reopen it in case if the issue is still persists on your end.
I have optional partners in my scenario which get a specific site, but all the routes stay the same. E.g.:
The list of partners is limited and will not collide with the subpages, so I created it like this:
For this the pipe
|
is missing in theRouter.pathRegExp
and I created a PR https://github.com/VeliovGroup/flow-router/pull/60Also I was thinking of a method to make this partner "sticky" for all further
FlowRouter.go()
, etc. calls and wondered if I am missing an option in the existing code. My implementation would be like the following:Do you think that a similar implementation would be of value to others?