Skip to content

Instantly share code, notes, and snippets.

@PCreations
Created May 31, 2024 17:00
Show Gist options
  • Save PCreations/a8f666a88d68916cff6b22f3bc09f7f5 to your computer and use it in GitHub Desktop.
Save PCreations/a8f666a88d68916cff6b22f3bc09f7f5 to your computer and use it in GitHub Desktop.
614fd33f99f0.diff
-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