I have a button that I need to give permission to a specific user If he logs in into a website. I can do this with *ngIf on the HTML file but I would like to give the HTML element an id and then do the permission operation on the .ts file.
<ul class="navbar-nav float-right" *ngIf="user.name === 'John'" >
<li class="nav-item" >
<a class="nav-link" routerLink="Private">Private</a>
</li>
</ul>
Thanks in advance.