<form #logoutForm method="post" [action]="formAction" hidden style="display: none">
    <input type="hidden" name="_csrf" [value]="csrfValue"/>
</form>
<button class="user-info" ngbDropdownToggle *ngIf="getIsAuth()">{{getUserFullname()}}</button>
<div ngbDropdownMenu *ngIf="getIsAuth()">
    <a routerLink="/mydata" class="data">Мои данные</a>
    <button ngbDropdownItem class="exit" (click)="logoutForm.submit()">Выйти</button>
</div>
<button class="exit" *ngIf="!getIsAuth()" (click)="logoutForm.submit()">Выйти</button>
