Skip to content
Advertisement

Angular removing selected options from a combobox with *ngFor

I am trying to write a code where a user adds a row to a tab, then selects an option from a combobox and enters a description for it. Once that description is entered, I don’t want that option to appear in the combobox for the next row. How can I do that while using *ngFor?

HTML:

JavaScript

Advertisement

Answer

You just need to filter your data, and assign to a same variable Here is the small sample code

HTML

JavaScript

TS

JavaScript
Advertisement