I attempted *ngIf validation data from Firestore. few users have only head = true data in firestore. need to validate every user has head = true. but, remaining users dnt have head = true, so error showing link this.
ERROR TypeError: Cannot read property 'head' of undefined
i try to solve this issue below
*ngIf="(access.access$ | async)?.role.head || null".
but except solution like this *ngIf="(access.access$ | async)?.role.(head || null)"
beginner at angular help me find out solution.
thanks in advance.