title: How to create an Observable of type boolean?
body: <p>I need to create an Observable that emits a booleand and can be changed from a function.</p>
  
  <p>I tried </p>
  
  <pre><code>showModal$ = new Observable&lt;boolean&gt;();
  </code></pre>
  
  <p>But it does't works.</p>
  
  <p>What I need is <code>showModal$</code> to be <code>false</code> by default. And change its value with a function</p>
  
  <pre><code>change() {
    this.showModal$ = !this.showModal$;
  }
  </code></pre>
  
  <p>I'm using Angular2 and I want to subscribe to that Observable from differents components. </p>
  
  <p>What's the best way to do this?</p>