title: Angular 5 http.get into a BehaviorSubject to multicast data changes on the client
body: <p>I have an angular 5 website which consumes a restful wcf web service.  The web service, in turn, interacts with business objects, that talk to a database.  I'm using the @angular/common/http module to consume the web service into an observable object which then renders on the web page.  So far so good.</p>
  
  <p>Now, am also updating the database via the web service, which also works fine.</p>
  
  <p>But, it's a tad slow, and I would like to be able to update the Observable directly and simulaneously with the update web service call, so that the web site does not have to wait for the data to go through the web service, through the incredibly slow enterprise resource planning business objects, to the database, and then back down into the Observable objects, updating the screen via the async pipe.</p>
  
  <p>So, I thought to myself, why not just replace the Observables with BehaviorSubjects?  Then, I could just use the "next" method on the BehaviorSubject to quickly update the page.</p>
  
  <p>But, when I try that...</p>
  
  <pre class="lang-js prettyprint-override"><code>public cartons$: BehaviorSubject&lt;ICartonTrackDetail[]&gt;;
  this.cartons$ = this.cartonService.getCartonsObservable();
  </code></pre>
  
  <p>I get this error...</p>
  
  <pre><code>Type 'Observable&lt;ICartonTrackDetail[]&gt;' is not assignable to type 'BehaviorSubject&lt;ICartonTrackDetail[]&gt;'.
    Property '_value' is missing in type 'Observable&lt;ICartonTrackDetail[]&gt;'.```
  </code></pre>
  
  <p>Now, the error makes sense, but it makes me step back and wonder: What is the best way to accomplish my goal?</p>