[Solved] angular 6 wait post response
Using async/await is perfect for your situation. It will help you to make your code more readable and make abstraction of the async part thanks to the await keyword aync post(){ const res1 = await this._service1.save(this.data1).toPromise(); const res2 = await this._service2.save(res1).toPromise(); console.log(‘here is my data 2 ‘ + res2); return ‘what you want, can be … Read more