now i am reduced my errors..but i have a run time error
Cannot read property 'file' of undefined
i tried ..
constructor(public file:File){}
function inside(){
this.platform.ready().then( success=>{
var options = {
destinationType:this.camera.DestinationType.FILE_URI,
sourceType:this.camera.PictureSourceType.PHOTOLIBRARY,
allowEdit: true,
encodingType:this.camera.EncodingType.JPEG,
targetWidth: 1024,
targetHeight: 768,
saveToPhotoAlbum: false,
correctOrientation: true
};
this.camera.getPicture(options).then(function (sourcePath) {
var sourceDirectory = sourcePath.substring(0, sourcePath.lastIndexOf('/') + 1);
var sourceFileName = sourcePath.substring(sourcePath.lastIndexOf('/') + 1, sourcePath.length);
sourceFileName = sourceFileName.split('?')[0];
this.file.copyFile(sourceDirectory, sourceFileName,this.file.dataDirectory, sourceFileName).then(function (success) {
this.uploadedImage = this.file.dataDirectory + sourceFileName;
}, function (error) {
alert("error uncountered");
});
});
}