In my application there is angular 2 service lets say "Configuration Service" which returns RxJS Observable sequence. This sequence contains configuration data. On subscribing this sequence it returns data however data returned is asynchronously. In normal scenario asynchronous call may be desired however in one particular case I need to get this configuration data "synchronously" as without that configuration data returned from service execution flow can not continue. Is there any way I can make blocking call with observable sequence so that I can still use this existing configuration service? My code looks something like below:
this.configService.getConfigData()
.subscribe(
x=>{
this.ConfigData = x;
},
e=>console.log(e)
);