Reputation: 864
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
Reputation: 41417
use ;
add multiple functions to the event.
(click)="show = !show; yourFunction()"
Upvotes: 3