user1687891
user1687891

Reputation: 864

How to add new functions on button click

I have a ngClass with condition in td as follows:

<tr>
    <td [ngClass]="{active: !show, inactive: show}"></td>
    <td></td>
</tr>

This ngClass is activated on button click function as below:

<button type="reset" class="btn btn-primary" (click)="show = !show">Play</button>

Now I have to add functions on this button click. How can add it?

Upvotes: 0

Views: 47

Answers (1)

Sachila Ranawaka
Sachila Ranawaka

Reputation: 41417

use ; add multiple functions to the event.

(click)="show = !show; yourFunction()"

Upvotes: 3

Related Questions