How can I create a custom directive(e.g. appCheckPermission ) to check if user can view a link or button base on routerLink that applied to that element.
<button [routerLink]="['/users/edit', userId]" appCheckPermission ></button>
p.s: there is a property that save routerlink value
nativeElement.attributes["ng-reflect-router-link"].value
but can not be access via custom directive.