What if I want to ensure that an HTTP call is synchronous because until the data is retrieved, no other operations must take place?
Why is there no option for writing a synchronous call in Angular 2 or higher versions?
What if I want to ensure that an HTTP call is synchronous because until the data is retrieved, no other operations must take place?
Why is there no option for writing a synchronous call in Angular 2 or higher versions?
Because this is an anti-pattern.
Http-Calls might always fail (as anything going over a network - this is out of your reach as a programmer) and if they fail your whole application fails, providing no fallback or at least a visual notification for the user that something is wrong.
And even when they don't fail they might take a long time during which your application should not appear frozen, so the user doesn't close it or throws the phone against the wall.
If you really want to make things synchronous, you can use several RXJS operators for that; see:
How can I make one RxJS Observable sequence wait for another to complete before emitting?