0

bypassSecurityTrustResourceUrl を使用して画像を解析しようとしていますが、出力で取得しています

SafeValue must use [property]=binding: data:image/jpeg;base64,(actual data) (see http://g.co/ng/security#xss)

下の画像のように

ここに画像の説明を入力

これが私のコードです

  loadImages(): void {
    this.projectsDetailService.getById(this.param_id).
    subscribe((data: any) => {
      console.log("Step 1")
      this.projectList = data;
      for (var index in this.projectList) {
        this.images = this.projectList[index].img;
        this.objectURL = 'data:image/jpeg;base64,' + this.images;
        this.thumbnail1 = this.sanitizer.bypassSecurityTrustResourceUrl(this.objectURL);
        this.projectList[index].img = this.thumbnail1;
        console.log("Data is "+this.thumbnail1);

      }
       
      
      }
       );
      }
 

htmlファイルで使用しようとしても、次のエラーが発生します

ここに画像の説明を入力

4

1 に答える 1