title: behaviourSubject in angular2 , how it works and how to use it
body: <p>I am trying to build a shared service as follow</p>
  
  <pre><code>import {Injectable,EventEmitter}     from 'angular2/core';
  import {Subject} from 'rxjs/Subject';
  import {BehaviorSubject} from 'rxjs/subject/BehaviorSubject';
  @Injectable()
  export class SearchService {
  
      public country = new Subject&lt;SharedService&gt;();
      public space: Subject&lt;SharedService&gt; = new BehaviorSubject&lt;SharedService&gt;(null);
      searchTextStream$ = this.country.asObservable();
  
      broadcastTextChange(text: SharedService) {
          this.space.next(text);
          this.country.next(text);
      }
  }
  export class SharedService {
      country: string;
      state: string;
      city: string;  
      street: string;
  }
  </code></pre>
  
  <p>I don't know how to implement BehaviourSubject  basically what I am trying here is just a mess I guess  and I am calling this value in child component by using</p>
  
  <pre><code>console.log('behiob' + shared.space.single());
  </code></pre>
  
  <p>which is throwing an error as .single()/last() etc whatever is available is not a function so can someone show me how it actually works and how to implement it as I searched for the examples but none is making sense to me.</p>