我有一个ngFor,在其中生成mat-list-items,我需要从包含组件上定义的属性中构造一个网址,如下所示:
<mat-list *ngIf="element == expandedRow">
<mat-list-item *ngFor="let recording of element.callRecordings;index as i">
<h4 matLine style="font-size:16px; font-weight: bold;">Recording {{i + 1}}</h4>
<p matLine>
<mat-basic-audio-player [audioUrl]="callRecordingsUrlRoot + recording.fileName" [displayTitle]="false">
</mat-basic-audio-player>
</p>
<a matLine [href]="callRecordingsUrlRoot + recording.fileName">Download</a>
</mat-list-item>
</mat-list>
callRecordingsUrlRoot
是在组件上定义的属性,但是当从ngFor中引用时,它不可用。
我该如何获取其价值?
谢谢!