You could do this with ngIf, but for performance reasons I wouldn’t. I would expose an Observable somewhere indicating whether we have an admin or not, and modify the array of available pages accordingly.
Hi @rapropos,
I thought same thing which I can use ng-if. But I know that we cannot use *ngFor and *ngIf together.
Is it possible to share an example about your observable solution??
The fact that ngIf expressions are evaluated zillions of times, so I try to avoid doing anything in them more complex than accessing a single property. By doing the calculation once based on a subscription, we avoid duplicated effort: