Is it possible to call two functions in one click in html?
Here is my code:
<div class="user-list"
(click)="threadService.createChatWindow()"
(click)="matrixService.newRoom(thread)">
</div>
It does not work
Is it possible to call two functions in one click in html?
Here is my code:
<div class="user-list"
(click)="threadService.createChatWindow()"
(click)="matrixService.newRoom(thread)">
</div>
It does not work
You cannot have two attributes, instead combine with ;
:
<div class="user-list"
(click)="threadService.createChatWindow(); matrixService.newRoom(thread)">
</div>