title: Subscribing observable which has self-reference property
body: <p>I have a class that store time information and my server will return timestamp to me. So I want to format and display date.</p>
  
  <pre><code>export class Product {
      timeCreated: number;
  
      // this don't work
      get timeCreatedDisplay () {
          const dateObject = new Date(this.timeCreated);
          return `${dateObject.getDate()}/${dateObject.getMonth() + 1}/${dateObject.getFullYear()}`
      }
  }
  </code></pre>
  
  <p>In component controller's ngOnInit()
  this</p>
  
  <pre><code>this.productService.getProduct(this.productId).subscribe(product =&gt; {
    this.product = product;
  });
  </code></pre>
  
  <p>The service</p>
  
  <pre><code>getProduct(id: number): Observable&lt;Product&gt; {
    return this.http.get&lt;Product&gt;(`${this.baseURL}/${id}`);
  }
  </code></pre>
  
  <p>The view</p>
  
  <pre><code>{{product.timeCreatedDisplay}}
  </code></pre>
  
  <p><hr>
  I tried setting timeCreatedDisplay function to return a fixed value and remove the API call (not calling the this.productService.getProduct...... line).
  It worked and displayed the fixed value.</p>
  
  <p>I also tried </p>
  
  <pre><code>this.productService.getProduct(this.productId).subscribe(product =&gt; {
    this.product = product;
    console.log(this.product.timeCreated)
    console.log(this.product.timeCreatedDisplay)
  });
  </code></pre>
  
  <p>which give me undefined for timeCreatedDisplay and a correct value for timeCreated</p>
  
  <p>So I suppose this is caused by the usage of http and observable?</p>