Is your feature request related to a problem? Please describe the problem.
If you pick good book, or talk to somebody with a bit experience you will hear to not use magic symbols, like peppering your code with "44.5", instead you should define constant "DefaultSizeShoe" and then use this constant instead.
Yet, for some time @page supports only literal, not a symbol constant.
Describe the solution you'd like
Please support constants for @page, so one could write:
@page MyConstants.Counter
Additional context
There is interesting history for this request, because it was asked again and again, like here:
if it becomes a common feature request we'll certainly consider it
And the request is closed (it is not possible to upvote it or comment). So I wonder how on Earth we can make it "common feature request" if you disable any interaction.
you can achieve this by using @attribute [Route(Constants.PageRoute)] instead of @page and everything else should be the same.
Yes it works, but discoverability is... super low. Besides, if we humans have to replace one code for another, why computer cannot do this?
Bottom line is, if for any reason this feature is not possible for now, please, pretty please, leave it open, so other can read, comment, upvote, etc. Thank you.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
If you pick good book, or talk to somebody with a bit experience you will hear to not use magic symbols, like peppering your code with "44.5", instead you should define constant "DefaultSizeShoe" and then use this constant instead.
Yet, for some time @page supports only literal, not a symbol constant.
Describe the solution you'd like
Please support constants for @page, so one could write:
Additional context
There is interesting history for this request, because it was asked again and again, like here:
https://github.com/dotnet/aspnetcore/issues/15977
And the request is closed (it is not possible to upvote it or comment). So I wonder how on Earth we can make it "common feature request" if you disable any interaction.
2 years later:
https://github.com/dotnet/aspnetcore/issues/23195
Yes it works, but discoverability is... super low. Besides, if we humans have to replace one code for another, why computer cannot do this?
Bottom line is, if for any reason this feature is not possible for now, please, pretty please, leave it open, so other can read, comment, upvote, etc. Thank you.