EventEmitter failed to transmit data from emit? Or failed to receive? (this problem is complicated)

this problem is relatively troublesome, but the organization I wrote is still very clear.

1. Using node.js server, a small example of search product is made. The structure is as follows:

2.:

3.:

4.:

5.product.service.ts :

6.search.component.ts :
private products: Observable

7.product.component.ts :

which master can you give me some advice? what is the problem?

Mar.06,2021

products is an array variable, while this.productService.search (.) returns a Observable .
so listening to form submission in product.component.ts should be:

this.productServuce.searchEvent.subscribe(params => {
    this.productService.search(params).subscribe((res:Product[]) => {
        this.products = res
    })
})
Menu