Dynamically change side menu

Hello guys,

I need to change side menu pages dinamically, based on a variable value (who logged in the app).
Side menu had to change when user log in and when user log out…
Any tips?

This is my solution, but i don’t know if is good…


	  <div *ngIf="!authService.userIsLogged()">
			<button ion-item  *ngFor="let p of pages" (click)="openPage(p)">

	  <div *ngIf="authService.userIsLogged()">
			<button ion-item  *ngFor="let p of pages2" (click)="openPage(p)">


this.pages = [
	{ title: 'Profilo utente', component: Profile }

this.pages2 = [
	{ title: 'Profilo utente', component: Profile },
	{ title: 'Spese dipendenti', component: Spese },
	{ title: 'Ordini clienti', component: Ordini }

Had 2 array of pages and show depends if user is logged or not…

Thx you.

No one has other solution?