When i’m using this below code my application showing a blank white screen
onTake(){
const options: CameraOptions = {
quality: 80,
allowEdit: true,
sourceType: this.camera.PictureSourceType.CAMERA,
saveToPhotoAlbum: false,
correctOrientation: true,
encodingType: this.camera.EncodingType.JPEG,
destinationType: this.camera.DestinationType.FILE_URI
}
this.camera.getPicture(options).then((imageData) => {
if (this.platform.is('android')) {
this.ImageData = imageData.replace(/^file:\/\//, '');
}
else {
this.ImageData = imageData;
}
this.photos.push(this.ImageData); //if you have to show multiple image
this.photos.reverse();
}, (err) => {
// Handle error
});
}
.html
<ion-row>
<ion-col col-3 *ngFor="let photo of photos; let id = index">
<ion-card class="block">
<ion-icon name="ios-close-circle-outline" class="deleteIcon" (click)="deletePhoto(id)"></ion-icon>
<img [src]="photo" *ngIf="photo" />
</ion-card>
</ion-col>
</ion-row>
please help me out how can i fix it
Thanks