I have applied subscribe method using angular 6. The problem is my api sometime may take time to send back response for an hour. I want browser or subscribe method to wait until i get complete response. Here is the code snippet
handleUpload(e){
this.filePath1 = e.target.files[0].name;
this.data1.getData(this.filePath1).subscribe(async data=> {
await this.s(data);
this.dataList.push(JSON.parse(this.s));
this.result = this.dataList[0].split("\n");
});
Comments
Post a Comment