HTML代码段
{{ snap.bytesTransferred | fileSize }} of {{ snap.totalBytes | fileSize }}
<div *ngIf="downloadURL | async as url">
<h3> Your Document is Successfully Uploaded</h3>
<img [src]="url">
<br>
<a [href]="url" target="_blank" rel="noopener">Download</a>
</div>
<button (click)="task.pause()" class="button btn-warning" [disabled]="!isActive(snap)">Pause</button>
<button (click)="task.cancel()" class="button btn-danger" [disabled]="!isActive(snap)">Cancel</button>
<button (click)="task.resume()" class="button btn-info" [disabled]="!(snap?.state === 'paused')">Resume</button>
</div>```
TS Code Snippet
快照:可观察;
//确定上载任务是否处于活动状态 isActive(快照){ 返回( snapshot.state ==='正在运行'&& snapshot.bytesTransferred <快照.totalBytes ); }
The error is occuring in the HTML File at the line ```<div *ngIf="snapshot | async as snap ">```
And the error reads "ERROR in src/app/Registration/researchers/researchers.component.html(42,41): Expected 2 arguments, but got 1.
src/app/Registration/researchers/researchers.component.html(42,41): Expected 2 arguments, but got 1."