title: Function gets logged on second call
body: <p>When I call component function for the first time this.products is undefined.
  After second call I see correct result.</p>
  
  <p>I also tried using Observable with the same result. I checked console logs on different browsers.</p>
  
  <pre><code>//Service function
    getProducts()
    {
      return this.http.get&lt;Product[]&gt;(this.serverUrl + '/products').pipe(map(data =&gt; data));
    }
  
  
  //Component function
    getProducts(){
      this.productService.getProducts().subscribe(data =&gt; (this.products = data));
      console.log(this.products);
    }
  </code></pre>