I wrote a service to access the spotify api. In the constructor this service should get the access token. Therefore I call subscribe method on an Observable.
The problem with that:
The service gets injected into my main component. There I call methods of this service to receive data from spotify api. I think the problem is that the access token is not yet received before the first request to the api tries to use it.
How can I do so, that the service only gets injected after the constructor finished getting the access token?