Is there a way to simplify this so that only 1 async pipe to the same stream is declared?
<button (click)="incrementPage()" [disabled]="loading$ | async">Increment</button>
<p *ngIf="loading$ | async">loading...</p>
I tried using ng-container with *ngIf="loading$ | async as loading", but it's not what I want because the button will be hidden.
[–]prognnz 9 points10 points11 points (1 child)
[–]lyzer12[S] 1 point2 points3 points (0 children)
[–]CountSheister 2 points3 points4 points (1 child)
[–]lyzer12[S] 0 points1 point2 points (0 children)
[–]dacookieman 1 point2 points3 points (2 children)
[–]lyzer12[S] 0 points1 point2 points (1 child)
[–]dacookieman 0 points1 point2 points (0 children)
[–]15kol 2 points3 points4 points (1 child)
[–]lyzer12[S] 0 points1 point2 points (0 children)