For example, if I have an Observable in my component and I want to use it in my template in multiple places or I need to put the Observable value into the child component in case of only the result is not null
my.component.ts
export class MyComponent {
myObservable$: Observable<SomeData | null>;
}
I can do it in these different ways:
First way
<child-component *ngIf="myObservable | async as data" [data]="data"></child-component>
Second way
<child-component *ngIf="myObservable | async" [data]="myObservable | async"></child-component>
I would to know is there any performance difference or usage recommendation?