I'm learning how to use Angular with an API and I have a search box where I can search for a data, now I want to make multiple searches as in if I make a search and get the result and clear and type different keyword I still get a result but I don't seem to get any after.
app.component.html
<input id="search" type="text" placeholder="" [(ngModel)]="inputKeyword" name="search" />
app.component.ts
searchData() {
this.results = this.googleService.getGoogle(this.inputKeyword)
.subscribe(x =>{
this.googleData = x.items;
console.log('googleData', this.googleData);
}, error => {
console.log("error here",error)
})
}