How can I use async/await in angular to make asynchronous requests. For example call a function postDataToServer(myData)
and only after it resolves call getDataFromServer()
? I've read examples but still haven't gotten it down and if I could see a basic example where you make one http request and another only after the first one finishes that would help a lot.
Edit: my http requests return observables not promises, maybe async/await isn't the right choice?