I'm attempting to remove a specific item from an array based on the selected option. To better understand, take a look at this code:
component.html
<fnd-extended-select label="Tipo Prodotto:" [(ngModel)]="landingType" name="tipoprodotto">
<fnd-option *ngFor="let p of agreementfilter?.landingPageTypes" [value]="p.id">{{p.description}}</fnd-option>
</fnd-extended-select>
Component.ts
deleteMsg() {
this.agreementfilter.landingPageTypes.splice(1, 1);
}
Essentially, when I click the button to delete the item, only the FIRST object in the array gets removed.
What I Want: Remove the item that I have selected from the array.
What are my options for solving this issue?
Appreciate your assistance!