Closing FAB in html file without function .ts; you can use fab.close()
in the html tag:
<ion-fab bottom left #fab> <ion-fab-list side="top"> <button [navPush]="cart" (click)="fab.close()" *ngIf="loggedIn" ion-fab> </ion-fab-list> </ion-fab>
Itβs so simpler, and you can use several functions for one event (for example, an event (click)
):
<button *ngIf="loggedIn" (click)="logout()" (click)="fab.close()" ion-fab>
Do not fake #fab
place in tag: <ion-fab #fab>
source share