docs(techniques/mvc): introduce @WithAlias() decorator#1400
Open
sjones6 wants to merge 2 commits intonestjs:masterfrom
Open
docs(techniques/mvc): introduce @WithAlias() decorator#1400sjones6 wants to merge 2 commits intonestjs:masterfrom
sjones6 wants to merge 2 commits intonestjs:masterfrom
Conversation
Documents the @WithAlias() decorator and getUrl helper introduced in PR nestjs/nest#5117
2 tasks
jmcdo29
reviewed
Aug 2, 2020
content/techniques/mvc.md
Outdated
Comment on lines
+109
to
+118
| @Get() | ||
| @Render('users-list') | ||
| @WithAlias('hello') | ||
| root(): User[] { | ||
| return [ /* list of users */ ]; | ||
| } | ||
|
|
||
| @Get('/:user') | ||
| @Render('user') | ||
| @WithAlias('hello') |
Correct route aliases to proper values reflecting the route
|
What would it take to get this merged? I'd really like this feature. |
johannesschobel
approved these changes
Dec 8, 2020
Contributor
|
The feature is available @RobertAKARobin , this is just the documentation. |
@johannesschobel - no, it's not, the PR is still open: nestjs/nest#5117 |
Contributor
|
i am sorry, i must have missed that. |
micalevisk
reviewed
Jan 31, 2022
| ``` | ||
| Once you have registered route aliases, you can access them via the `getUrl(routeAlias: string, routeParams?: object): string` method that is injected into the template render context. | ||
|
|
||
| ```njk |
Member
There was a problem hiding this comment.
I guess this njk is making the building fails. Try text instead.
|
Did this end up going any where? |
|
What happened to that PR? |
|
any update on this features? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the @WithAlias() decorator and getUrl helper introduced in PR nestjs/nest#5117
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: See issue nestjs/nest#5117 and PR nestjs/nest#3743.
What is the new behavior?
Adds documentation for
@WithAlias()decorator andgetUrl()helper.Does this PR introduce a breaking change?
Other information