I have a component where I want to hide an element if the user is null. Currently it shows if the user exists:
<ng-container *ngIf="user | async as _user">
Here is the component.ts part:
this.user = this.auth.userSubject.asObservable();
I want to do the opposite of:
<ng-container *ngIf="user | async as _user">
so that it only shows if the user$ is null
at the top of the logout component is:
userSubject: BehaviorSubject<UserModel>;
when they log out:
this.userSubject.next(null);