Answer the question
In order to leave comments, you need to log in
How to build a queue in angular?
save_custom(): Observable<void> { // я всё вызываю и никак иначе
this.createFile() // я асинхронный и должен сработать вначале
return this.save_order() // я синхронный и я должен сработать в конце
}
Answer the question
In order to leave comments, you need to log in
If this.createFile() returns an observable then
save_custom(): Observable<void> {
return this.createFile()
.pipe(
tap(() => this.save_order()),
);
async save_custom(): Promise<void> {
await this.createFile();
return await this.save_order();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question