Closed bigyanchap closed 3 years ago
public requestCategories = (text: string) => {
this.categoryService.getCategoriesBySubStr({ word: text });
};
You're not returning the Obervable?
I am not sure, I understood what you asked. I hope this satisfies your question:
.getCategoriesBySubStr({ word: text })
but it gave me error.
Then, I guessed, it is the library which subscribes to the List<DisplayValueDTO>
that comes from server side.
where, DisplayValueDTO is...
public class DisplayValueDTO
{
public Int64 Value { get; set; }
public string Display { get; set; }
}
If you don't return an Observable, your function is void:
public requestCategories = (text: string) => {
return this.categoryService.getCategoriesBySubStr({ word: text });
};
Thank you Gbumprisco. I see what I missed. Now it's working like charm.
I'm submitting a ...
Current behavior
I get following error while tags were observed:
Expected behavior
Display Tags in a dropdown
Minimal reproduction of the problem with instructions (if applicable)
---html---
--- component ---
--- category.service.ts ---
--- api.service.ts ---
Built the app using:
angular CLI
Angular version:
Angular v8
ngx-chips version:
2.1.0
Browser: Chrome XX