title: Angular CLI Services stored String variable always return to default value
body: <p>I'm new to angular CLI.  this happened when I tried to pass a string value to services and later tried to retrieve it in another component </p>
  
  <p><strong>select.ts</strong></p>
  
  <pre><code>public gotofriends(fname:string, fpic:string){    
      const service = new FbdetailsService();
      service.selectedfrienddetails(fname, fpic);
      this.router.navigate(['calculate']);
  }
  </code></pre>
  
  <p><strong>select.html</strong></p>
  
  <pre><code>&lt;button (click)="gotofriends(user.name,user.picture.data.url)" class="btn btn-lg btn-primary mx-1"&gt;Select &amp;nbsp;&lt;/button&gt;
  </code></pre>
  
  <p><strong>fbdetails service</strong></p>
  
  <pre><code>export class FbdetailsService {
      fbname;
      fbpic;
      public selectedfrienddetails(name: string, profilephoto: string) {
          this.fbname = name;
          this.fbpic = profilephoto;
          console.log("selected friend details", this.fbname, this.fbpic)
      }
  
  
      public returnfrienddetails() {
          console.log(this.fbname, this.fbpic)
      }
  }
  </code></pre>
  
  <p><strong>calculate componet.ts</strong></p>
  
  <pre><code>public printname(){
      const service = new FbdetailsService();
      service.returnfrienddetails()
  }
  </code></pre>
  
  <p><strong>calculate HTML</strong></p>
  
  <pre><code>&lt;button (click)="printname()" class="btn btn-lg btn-primary mx-1"&gt;Calculate&lt;/button&gt;
  </code></pre>
  
  <p>when I call <strong>selectedfrienddetails()</strong> in <strong>selectcomponet.ts</strong> it succefully printing string to console but when I tried to call <strong>returnfrienddetails()</strong> in <strong>calculatecomponent.ts</strong>  it doesn't print any value .  </p>
  
  <p>then I tried adding two buttons to <strong>selectcomponent.ts</strong><br>
  first one pass <strong>selectedfrienddetails()</strong> and successfully print variable then   second one call <strong>returnfrienddetails()</strong>  but as in first case  <strong>returnfrienddetails()</strong> didn't print anything.    </p>