toggleCollapse(i) {
this.toggles[i] = !this.toggles[i];
return false;
}
I have a parent 'tr tag' with a click event which toggle collapse states. Inside i have a td tag which will hold some content. I want to cancel the click event trigging when clicking on 'the td' tag. Example code:
<tr *ngFor="let record of records; let i = index" class="pointer" (click)="toggleCollapse(i)">
<td>{{record.id}}</td>
<td>{{record.skapad}}</td>
<td>{{record.status}}</td>
<td (click)="cancel here">
<pre *ngIf="!toggles[i]" class="wrap-whitespaces pointer-text">{{getShortContent(record.content)}}</pre>
<pre *ngIf="toggles[i]" class="wrap-whitespaces pointer-text">{{record.content}}</pre>
</td>
</tr>