Skip to content Skip to sidebar Skip to footer

Choose Multiple Files With A Delete Button Nearby Angular

Introduction: I have a table where in a column it consists of an option to choose or upload files as an input to the table. I have written code in such a way that I can choose mult

Solution 1:

In your html your forgot to add a "let" before f variable

<li *ngFor="let f of files">

In your app.components.ts file, try to use filter not map. this.files.map() isn't filtering out the elements. Console log the output to debug

removeFile(i: number) {
   this.files = this.files.filter(x => x.index != i);
  }

Post a Comment for "Choose Multiple Files With A Delete Button Nearby Angular"