I have one table content in which I have created view of it's list and performing the edit and deleting task on it.
I am trying it by calling in services the splice
method and in the component it's service by id.
table.component.ts:
delete(com) {
this.service.DeleteUser(com);
console.log(com);
}
table.component.html:
<a class="btn btn-outline-danger btn-sm" (click)="delete(com.id)">Delete</a>
service:
DeleteUser(index: number) {
this.company.splice(index, 1);
this.company_change.next(this.company.slice());
}
I want to get delete button on working condition,company:Company[]
list is been created by type model
.