How to control sidemenu


#1

I wish to control the sidemenu option by different login access, such as userA login, the sidemenu will provide option A and option B, and admin user login, the sidemenu will provide option Admin.
May I know how can I control that in app.component.ts? The value seem like is not refresh.


#2

The easiest way to do this is just use an ngIf on the sections or menu-items with conditions based on the user’s rol in the app.