title: Subscriber doesn't receive value from .next()
body: <p>I'm trying to create a shared service to communicate between components using an Observable, using: <a href="http://blog.angular-university.io/how-to-build-angular2-apps-using-rxjs-observable-data-services-pitfalls-to-avoid/" rel="nofollow noreferrer">http://blog.angular-university.io/how-to-build-angular2-apps-using-rxjs-observable-data-services-pitfalls-to-avoid/</a> as a guide:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Observable } from 'rxjs/Observable';
  import { BehaviorSubject } from 'rxjs/BehaviorSubject';
  
  
  @Injectable()
  export class ModalService {
  
    private _isOpen: BehaviorSubject&lt;boolean&gt; = new BehaviorSubject(false);
    public isOpen: Observable&lt;boolean&gt; = this._isOpen.asObservable();
  
  
    openModal() {
      this._isOpen.next(true);
    }
  
    closeModal() {
      this._isOpen.next(false);
    }
  
  }
  </code></pre>
  
  <p>in my component(s), I subscribe to <code>isOpen</code>, which receives a value when subscribing:</p>
  
  <pre><code>. . .
  
    ngOnInit(): void {
      this.subscription = this.modalService.isOpen.subscribe(state =&gt; {
        console.log('`isOpen` in subscription', state);
      });
    }
  </code></pre>
  
  <p>However, when I trigger <code>.openModal()</code> on the shared service instance, the subscriber never receives the new value. What am I doing wrong?</p>
  
  <p>My logic was that by using a Behavior Subject, the subscriber would receive an initial value of <code>false</code>, then I could change the value on click from other components that have an instance of the shared service.</p>