Ct9
Ct9

Reputation: 150

Different Sidemenu in ionic 2 app

I would like to have different side menus in ionic 2 app based on user login. When a user logs in as customer , I want to show a side-menu with customer functionalities. When a user logs in as admin, I will show different side-menu.

I am using Ionic 2 sidemenu template

Any help would be really appreciated.

Upvotes: 0

Views: 416

Answers (1)

Isaac Hardy
Isaac Hardy

Reputation: 11

You could use *ngIf on an element inside your sidebar to display based on if the user is logged in as admin.

Example:

<div class="side-bar-admin" *ngIf="admin'"></div>

Upvotes: 1

Related Questions