I have a sidebar with list of items like people, equipments, store which on click will route to their pages(separate components). And when I login I get this json along with the user data.
{
"equipments": [0,0,0],
"people" : [1,1,1],
...
}
For instance on a people[show=1, edit=1, delete=1] (ex. [1,0,0] 0 = not permitted, 1 is permitted). a user can view a person detail, edit a person detail(edit button is enabled) and delete a person where delete button is enabled.
If a view show permission is like in the case of equipment it should be hidden in the sidebar and also reroute the route to home page. Is there any better way to implement it without bunch of *ngIf. Thanks in advance. If the question is unclear please let me know by commenting. I am new here.