I am currently in the process of refactoring my code
<ng-container *ngIf='taskOutputs$ | async as taskOutputs && taskOutputs.outputs.length; else neverImportedOrLoading'>
I encountered an issue with
Unexpected token &&, expected identifier
Do you think it is necessary to separate this into a child ng-container
HTML element? like below?
<ng-container *ngIf='taskOutputs$ | async as taskOutputs && taskOutputs.outputs.length; else neverImportedOrLoading'>
<ng-container taskOutputs.outputs.length; else neverImportedOrLoading'>
</ng-container>
</ng-container>
Edit
Trying it this way (adding ()
)
<ng-container *ngIf='(taskOutputs$ | async as taskOutputs) && taskOutputs.outputs.length; else neverImportedOrLoading'>
resulted in another error:
Missing expected ) at column 23 in [(taskOutputs$ | async as taskOutputs) && taskOutputs.outputs.length; else neverImportedOrLoading]