title: How to wait for async subscribe to full fill a global variable?
body: <p>I have an async firebase call similar to:</p>
  
  <pre><code>this.fbProvider.fbGetProfile()
                 .subscribe(p =&gt; {                                       
                              this.profile = p;
                           });
  </code></pre>
  
  <p>...but then I need to use <code>this.profile</code> in others function like...</p>
  
  <pre><code>console.log(this.profile.email);
  </code></pre>
  
  <p>...and it keeps returning an error:</p>
  
  <blockquote>
    <p>Cannot read property 'email' of undefined</p>
  </blockquote>
  
  <p>any idea how I could wait for the subscribe to full fill my local variable before I need to use it?</p>
  
  <p>ps: my problem is bigger than that and solutions such as using <code>.then()</code> makes my code a mess. I tried something with <code>await</code>, but it did not work out as well.</p>
  
  <p>`</p>