Solution which works with empty object, null and undefined as a value:
<ng-container *ngIf="(user | keyvalue)?.length"> {{ user.id }} </ng-container>
Alternative solution:
<ng-container *ngIf="(user | json) != '{}'"> {{ user.id }} </ng-container>
Solution which works with empty object, null and undefined as a value:
<ng-container *ngIf="(user | keyvalue)?.length"> {{ user.id }} </ng-container>
Alternative solution:
<ng-container *ngIf="(user | json) != '{}'"> {{ user.id }} </ng-container>