title: angular http request after storage value is available
body: <p>I'm new in Angular and ionic and I build a native app for list messages, posts and more. I use the WordPress RESTApi with JWT Token. The token I store with @ionic/storage. After login I need to wait till the storage value is stored for an auth. API request as subscription. How I can wait till the storage value is setup and then make an http request?</p>
  <p>Here is my code</p>
  <pre><code>usr = new BehaviorSubject(null);
  constructor(private http: HttpClient, private storage: Storage, private plt: Platform, private router: Router) {
      this.storage.create();
      this.plt.ready().then(() =&gt; {
  this.storage.get(JWT_KEY).then(data =&gt; { if(data){ this.usr.next(data) }); 
  });
  
  getUserValue() {
     return this.user.getValue();
  }
  getAllMessages() {
      let usr = this.getUserValue(); let url = usr['mainpath'];
        let url = usr + '/app/v1/messages/all';
        return this.http.get&lt;any[]&gt;(url).pipe(
          map(data =&gt; {
            return data;
          })
        );
    }
  </code></pre>
  <p>When I call getAllMessages in a component they are not working because the storage value is not setup, but I can't use then() from storage to create a obs. http request?! Where I'm wrong?</p>