(food: any)
| 1236 | } |
| 1237 | |
| 1238 | remove(food: any): void { |
| 1239 | const index = this.foods().indexOf(food); |
| 1240 | |
| 1241 | if (index > -1) { |
| 1242 | this.foods.update(current => { |
| 1243 | const newValue = current.slice(); |
| 1244 | newValue.splice(index, 1); |
| 1245 | return newValue; |
| 1246 | }); |
| 1247 | } |
| 1248 | } |
| 1249 | |
| 1250 | @ViewChild(MatChipGrid) chipGrid!: MatChipGrid; |
| 1251 | @ViewChildren(MatChipRow) chips!: QueryList<MatChipRow>; |