Sabith Pocker
Poetics of Code

Poetics of Code

Custom Structural Directive in Angular for User Roles

Aug 9, 20202 min read

Example code for a custom structural directive in angular which acts similar to *ngIf but can be customised to fit your business logic like user roles or permissions or other cases where the same logic is repeated using *ngIf and makes it hard to cha...