MCPcopy Create free account
hub / github.com/angular/components / remove

Method remove

src/material/chips/chip-grid.spec.ts:1238–1248  ·  view source on GitHub ↗
(food: any)

Source from the content-addressed store, hash-verified

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>;

Callers

nothing calls this directly

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected