title: Angular 4: Class with constructor as http Observable model
body: <p>In my app, I have a model defined as Class with a constructor. Like this:</p>
  
  <pre><code>export class Movie {
      title: string;
      posterURL: string;
      description: string;
  
      public constructor(cfg: Partial&lt;Movie&gt;) {
          Object.assign(this, cfg);
      }
  
      getEndDate(): Date {
          return new Date();
      }
  };
  </code></pre>
  
  <p>I also have an HTTP request that uses this model</p>
  
  <pre><code>getMoviesData(): Observable&lt;Movie[]&gt; {
      return this.http.get&lt;Movie[]&gt;(`http://localhost:3544/movies`)
  }
  </code></pre>
  
  <p>As expected, it doesn't work</p>
  
  <p>How can I solve this? Should I also create an interface or what?</p>
  
  <p>Thanks for the help :)</p>