hello , i try to set a menu when the user swip the screen , i add the event of the swip, but i can’t find a way to manipulate the menu with the .ts file , any idea ?
Try using *ngIf
in your menu items. Include all possible menu items and show/hide them according to certain variables’ values.
Something like
<button ion-button *ngIf="loggedIn()"
…
I would only use ngIf
on menu items if they are all at the bottom of the menu. Users get reflex memory for where things are on a screen, and adding/removing items in a situation where this causes stuff to move around is disorienting. This is why I generally prefer disabling in situations like this, instead of using ngIf
.