I work on angular 8 i have two subscribe
i need to execute first subscribe and after finish
execute second subscribe
but i don't know how to make it please ?
first function i need to execute is
getactivesession
second function i need to execute it
compareexcel
so how to do that please ?
JavaScript
execute it first
this._dataService.getActiveSessions(flagButton).subscribe(resp => {
if (resp) {
alert('There are active session working')
} else {
console.log('nooo');
}
});
execute it second
this._dataService.CompareExcel(this.selectedoptions,this.fileToUpload).subscribe(resp => {
if (resp) {
this._dataService.PostUpload(this.selectedoptions,this.fileToUpload)
.subscribe(blob => {
saveAs(blob.body, this.fileToUpload.name +'.xlsx');
});
Uttam KumarRank #1,076 · 1.8K reputationPosted Apr 18, 2022, 2:06 AM EDT
ahmed salahRank #1,744 · 866 reputationPosted Apr 18, 2022, 2:16 AM EDT
Uttam KumarRank #1,076 · 1.8K reputationPosted Apr 18, 2022, 1:50 PM EDT