Extend the *ngIf Syntax to Create a Custom Permission Directive

By Juri Strumpflohner

So our use case is to create a directive, which shows/hides elements on the page based on our currently authenticated user’s permissions. In this article we will go over a very simple use case, but which could easily be extended and used in a real production application. By creating such directive we’ll also take a deeper look at the syntax that Angular’s ngIf and ngFor directives use.

Source:: juristr.com