We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement
Package Version: 5.0
I want design a REST API {owner}/{project}/tree/{branch}/* to view the folder structure.
{owner}/{project}/tree/{branch}/*
|- root |- folder1 |- folder2 |- folder3 |- file1
{owner}/{project}/tree/{branch}
folder1
{owner}/{project}/tree/{branch}/folder1
folder2
{owner}/{project}/tree/{branch}/folder1/folder2
folder3
It is similar to github's repo url.
Code
I use router config like below first
{ "path": "{owner}/{project}/tree/{branch}/{folderPathes}", "outlet": "view-project-tree" }
folderPathes can be empty or null, 'folder1', 'folder1/folder2' which contains /
folderPathes
/
But the router can not switch '{owner}/{project}/tree/{branch}/folder1' to '{owner}/{project}/tree/{branch}/folder1/folder2'
may be here do a check
https://github.com/dojo/framework/blob/master/src/routing/Router.ts#L244
if (route.segments[segmentIndex] === undefined) { type = 'partial'; break; }
because route.segments length is greater than params length
route.segments
params
So I expect to support wildcard like this
{ "path": "{owner}/{project}/tree/{branch}/*", "outlet": "view-project-tree" }
Expected behavior:
{ "path": "tree/*", "outlet": "view-tree" }
* can be zero or more segments
*
tree
tree/folder1
tree/folder1/folder2
The text was updated successfully, but these errors were encountered:
May be, route config should be nested router.
{ "path": "tree", "outlet": "view-tree-root", "children": [ { "path": "*", "outlet": "view-tree-children" } ] }
which can partial refresh the tree part.
Sorry, something went wrong.
maier49
Successfully merging a pull request may close this issue.
Enhancement
Package Version: 5.0
I want design a REST API
{owner}/{project}/tree/{branch}/*
to view the folder structure.{owner}/{project}/tree/{branch}
to getfolder1
{owner}/{project}/tree/{branch}/folder1
to getfolder2
{owner}/{project}/tree/{branch}/folder1/folder2
to getfolder3
It is similar to github's repo url.
Code
I use router config like below first
folderPathes
can be empty or null, 'folder1', 'folder1/folder2' which contains/
But the router can not switch '{owner}/{project}/tree/{branch}/folder1' to '{owner}/{project}/tree/{branch}/folder1/folder2'
may be here do a check
https://github.com/dojo/framework/blob/master/src/routing/Router.ts#L244
because
route.segments
length is greater thanparams
lengthSo I expect to support wildcard like this
Expected behavior:
*
can be zero or more segmentstree
, not include the ending/
tree/folder1
tree/folder1/folder2
The text was updated successfully, but these errors were encountered: