I have input property [visitors]:
<app-visitor-component [visitors]="visitors"></app-visitor-component>
How replace [visitors]="visitors" on async like:
[visitors]="service.currentUser | async"
I have input property [visitors]:
<app-visitor-component [visitors]="visitors"></app-visitor-component>
How replace [visitors]="visitors" on async like:
[visitors]="service.currentUser | async"
If your service is an Observable you need to use an Elvis operator:
[visitors]="(service | async)?.currentUser"
You could send it as Observable , if not use async as follows
<app-child [visitors]="(service.currentUser| async)">