The best approach would be to create a new component, e.g. in this case app-profile
and to pass profile | async
to that component. Inside the component you can name the variable whatever you like.
<app-profile [profile]="profile | async"></app-profile>
Another way of doing it would be to use *ngIf with the 'as' syntax
<ng-container *ngIf="profile | async as p">
<div> {{ p.username }}</div>
<div> {{ p.email }}</div>
</ng-container>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…