ionic初学者求助

test1.ts引入test2.ts文件

我怎么在test1中获取test2中某个方法的返回值

如:

test2是这样:

openAlbum(){

const options = {

quality: 100,

maximumImagesCount: 6,

};

let _this = this;

this.imagePicker.getPictures(options).then((results) => {

_this.uploader.pathArrayToDataURL(results,(dataurls)=>{

_this.imgArr.concat(dataurls);

 

});


}, (err) => { alert('failed') });

}

 

现在我要在test1中获取dataurls  怎么拿到


慕森王
浏览 555回答 1
1回答

素胚勾勒不出你

可以使用 callback, 也可以使用promise...也可以使用rxjs....
打开App,查看更多内容
随时随地看视频慕课网APP