I have project with array of notifications. I add them to template using *ngFor. How can I pass some data about current notification from template to delete it from array?
My project.ts
public notifications: Notification[] = [...someData];
clearOne() {
...should delete from array
}
My project.html
<div *ngFor="let n of notifications">
<div (click)="clearOne">{{ n }}</div>
</div>