title: Angular child to parent communication using service
body: <p>I have seen in various places that show communication between parent to child component using Input, Service and template variables. </p>
  
  <p>If I want to communicate from child to parent component we can use Output Emitters.</p>
  
  <p>Is there a way to communicate using a service from child to parent component?
  The problem is if we have two clone components for eg :</p>
  
  <p>in parent.component.ts</p>
  
  <pre><code>&lt;child-component&gt;&lt;/child-component&gt;
  &lt;child-component&gt;&lt;/child-component&gt;
  </code></pre>
  
  <p>using emitters we can use callback function for each emitter as below</p>
  
  <pre><code>&lt;child-component (someevent) = "callback1($event)"&gt;&lt;/child-component&gt;
  &lt;child-component (someevent) = "callback2($event)"&gt;&lt;/child-component&gt;
  </code></pre>
  
  <p>Using service how can we design the same as what emitters do?</p>