Angular custom directive basically two types i.e. Attribute and Structural. Here I explained about Attribute-based directive.
And also discussed how to restrict the navigation by user role.
The full project can be found on : https://github.com/b2expert/angular7
#angularcustomdirective #navigationrestriction #angular7directives #elementreference