実現したいこと
選択されたプルダウンの金額に応じて対象の商品を取得してくる処理の作り方が分からない。angularとnode.js Postgresを使用している。
発生している問題・分からないこと
プルダウンで選択された情報を取得する方法が知りたい。
該当のソースコード
全体の処理の流れとしては以下のようなものとなっている。例:サンプルコード onSearch(): void { this.http.get('/api/search?keyword=example').subscribe(response => { this.results = response; }); } ↓ @Get('search') search(@Query('keyword') keyword: string): Promise { return this.searchService.searchKeyword(keyword); } ↓ ↓ async searchKeyword(keyword: string): Promise { return this.searchRepository.findByKeyword(keyword); } ↓ async findByKeyword(keyword: string): Promise { return this.dataSource.query( 'SELECT * FROM items WHERE name LIKE ?', [%${keyword}%] ); }
試したこと・調べたこと
- teratailやGoogle等で検索した
- ソースコードを自分なりに変更した
- 知人に聞いた
- その他
上記の詳細・結果
具体的な解決策が得られなかった
補足
特になし

あなたの回答
tips
プレビュー