照片库拍照问题。图片不出现

时间:2019-01-28 10:32:33

标签: ionic3

救救我!!!!

upload.ts

fetchPhotos() {
this.photoLibrary.requestAuthorization().then(() => {
    this.photoLibrary.getLibrary().subscribe({
        next: library => {
            this.photos = library;
            this.cd.detectChanges();
        //  console.log(this.library[0].thumbnailURL)     
//this.tempImagePath = normalizeURL(imagePath);
        },
        error: err => { },
        complete: () => { console.log("could not get photos"); }
    });
}).catch(err => console.log("permissions weren't granted"));
}

upload.html

     <div class='photos' *ngIf='photos'>
                <div class='photo' *ngFor='let photo of photos;'>

                    <img [src]="photo.photoURL" alt="{{photo.fileName}}"><br>

                    {{ photo.photoURL }}
                </div>
            </div>

离子信息 https://hizliresim.com/LlbaLo

屏幕 https://i.hizliresim.com/Gm9YVr.jpg

İf错误= [src] =“ photo.photoURL | cdvphotolibrary”

    <div class='photos' *ngIf='photos'>
                <div class='photo' *ngFor='let photo of photos;'>

                    <img [src]="photo.photoURL | cdvphotolibrary" alt="{{photo.fileName}}"><br>

                    {{ photo.photoURL }}
                </div>
            </div>

https://i.hizliresim.com/JZQYmJ.png

0 个答案:

没有答案
相关问题