Try to search your question here, if you can't find : Ask Any Question Now ?

*ngIf auth user inverse

HomeCategory: stackoverflow*ngIf auth user inverse
Avatarsourav asked 5 months ago

I’m using the following code to show items as long as the user is authenticated.

<div *ngIf="auth.user | async as user" class="px-3 pt-3">
  <h4 class="font-weight-light">{{ user.displayName }}</h4>

Everything works well. But what happens if I want to place content when the user is not authenticated? what would be the opposite of this?

I tried the following but it did not work:

<mat-nav-list *ngIf="!auth.user | async as user">
  <a mat-list-item (click)="selected()" [routerLink]="['/']">
  <i class="material-icons-outlined mr-2">event</i>Login
1 Answers
Best Answer
AvatarArben answered 5 months ago
Your Answer

3 + 14 =

Popular Tags

WP Facebook Auto Publish Powered By :