https://stackblitz.com/edit/angular-ivy-s2ujmr?file=src/app/country-card/country-card.component.html
I am currently working on implementing a search bar in Angular that filters the "countries$" Observable based on user input.
My approach involves creating two additional Observables: one for the search term and another for loading flags. I plan to use "combinedLatestWith" to filter flags whenever there is new input in the search term.
As a newcomer to Angular, I have not used "combinedLatestWith" before and I am facing difficulties in making it work. Below is the code snippet I have been working on:
/* The JavaScript code provided here */
However, I am encountering TypeScript errors:
Property 'pipe' does not exist on type 'OperatorFunction<unknown, [unknown, unknown, string | null]>'.ts(2339)
+
Property 'filter' does not exist on type 'HomeComponent'.ts(2339)
I would appreciate assistance in resolving these errors. Additionally, I seek guidance on whether my approach is correct. If I manage to fix the TypeScript errors, will "combinedLatest" function as intended to filter the results? Am I utilizing "combinedLatestWith" correctly?