title: Watch for changes in Angular 2 services function
body: <p>I have a service named <strong>HomeService</strong>  and in that service I am setting and getting some data which is working fine. Here is the code for my service.</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  
  @Injectable()
  export class HomeService {
  
  name:string;
  
  constructor() { }
  
  setParams(val) {
        this.name = val;
  }
  getParams() {
      return this.name;
  }
  
  }
  </code></pre>
  
  <p>I am setting params in a <strong>component A</strong> and getting it in <strong>component B</strong>. What I want is to keep watching the <strong>getParams()</strong> for changing in the second component.
  I am getting the params value in <strong>component A</strong> in which I am setting it but I couldn't get those value in <strong>Component B</strong>. Means in <strong>Component B</strong> its not watching for changes.</p>