Created
May 31, 2024 17:00
-
-
Save PCreations/a8f666a88d68916cff6b22f3bc09f7f5 to your computer and use it in GitHub Desktop.
614fd33f99f0.diff
This file contains 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
-6,7 +6,7 @@ export class AppController { | |
constructor(private readonly appService: AppService) {} | |
@Get() | |
- getHello(): string { | |
+ getHello(@Query() query?: { title: string }): string { | |
return ` | |
// ... | |
<body> | |
<form> | |
+ ${query?.title ? '<p>Book added</p>' : ''} | |
<label for="title">Title</label> | |
<input type="text" id="title" name="title"> | |
<button type="submit">Add book</button> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment