我如何在圖像的 src 中使用 {{ }}?我在 [src] 附近收到此代碼錯誤 <ion-list> <ion-item *ngFor="let item of results| async"> <ion-thumbnail slot="start"> <ion-img [src]={{ item.qrlink }}></ion-img> </ion-thumbnail> <ion-label>{{ item.Title }}</ion-label> </ion-item></ion-list>在 page.ts 我有這個代碼: submit_newcheck() { this.results = this.encryptionService.newcheck(this.checkid,this.cost,this.toname,this.tocode,this.passcode,this.date ); }它連接到這樣的服務:export class EncryptionService { constructor(private http: HttpClient) { } newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string): Observable<any> { return this.http.get(`https://api.test.com/encrypte.php?checkid=${encodeURI(checkid)}&&cost=${encodeURI(cost)}&&toname=${encodeURI(toname)}&&tocode=${encodeURI(tocode)}&&passcode=${encodeURI(passcode)}&&date=${encodeURI(date)}`).pipe( map(results => results['Data']) ); }}
如何在圖像 src ionic 中使用變量
慕田峪7331174
2022-06-09 10:37:11