Skip to content

Blazor routing @virtpage "{page:int}" #13544

New issue

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

Closed
ichensky opened this issue Aug 29, 2019 · 1 comment
Closed

Blazor routing @virtpage "{page:int}" #13544

ichensky opened this issue Aug 29, 2019 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue

Comments

@ichensky
Copy link

Now in blazor for routing used attribute @page "/path/next/{page:int}"
which takes as a parameter full path of page: "/path/next/{page:int}".

It would be nice to have a similar attribute @virtpage "/{page:int}"
which just takes as a parameter last changeable part of the url
and another data for mapping to the url "/path/next/"
will be taken from the virtual directory path.

This attribute will simplify scenario when we have several pages:

.
├── Admin
│   ├── Admin.razor
│   └── Content
│       └── Category
│           ├── View.razor     |  @virtpage "/{id}"     |  @page "/admin/category/view/{id}
│           └── List.razor     |  @virtpage             |  @page "/admin/category/list
├── Counter.razor              |  @virtpage             |  @page "/counter"
├── Error.razor                |  @virtpath             |  @page "/error"
├── FetchData.razor            |  @virtpage             |  @page "/FetchData"
└── Index.razor

and just want that routing of pages will be mapped directly to the *razor files in directories.

@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label Aug 29, 2019
@mkArtakMSFT
Copy link
Member

Thanks for contacting us, @ichensky.
We plan to handle this as part of #8787

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Aug 29, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants