title: Angular Material cross component data transmitting
body: <p>I am trying to accomplish something which could easily be accomplished with a Global variable in any database management system.</p>
  
  <p>I trying to pass data from one component to another, via a service.  The components could be described as siblings which are in the components folder, and the service is in a services folder which is a sibling of the components folder.</p>
  
  <p>The component in the statususers folder should be emiting data to a component in the hours folder via a service.</p>
  
  <p>The service is very simple:</p>
  
  <pre><code>    import { Injectable }     from '@angular/core'                  ;
      import { EventEmitter }   from '@angular/core'                  ;
      import { Subject }        from 'rxjs/Subject'                   ;
      import { Statususers }    from '../models/statususers.model'    ;
  
      import 'rxjs/add/operator/map'                                  ;
  
      @Injectable()
      export class CribsService 
      {
        aircraftSelected = new EventEmitter&lt;Statususers&gt;()  ;  
      }
  </code></pre>
  
  <p>And it receives data from the statususers component from this code.</p>
  
  <pre><code>   this.cribsService.aircraftSelected.emit(this.statususers)   ;
  </code></pre>
  
  <p>Since I am so new at this, I feel that the problem is that the service is not getting the data which should be emitted in the code immediately above.</p>
  
  <p><a href="https://i.stack.imgur.com/vfQPt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vfQPt.jpg" alt="enter image description here"></a></p>