How to get new instance/reload all services on logout in Angular2
<p>I am developing angular2 application which is similar to Plunkr link provided at the end.</p>

<p>In HeroService i have an property clickCount, which will be incremented on click of hero. But After login i want to reset this parameter. I don't want to use the service and reset its value (actually in my application i am using many services, so cannot use each service and reset its value on logout).</p>

<p>Is there any method to reset/reload service on particular action without reloading entire application.
Hero service is as below</p>

<pre><code>import { Hero } from './hero';
import { HEROES } from './mock-heroes';
import { Injectable } from '@angular/core';

@Injectable()
export class HeroService {
  getHeroes(): Promise&lt;Hero[]&gt; {
    return Promise.resolve(HEROES);
  }

  getHeroesSlowly(): Promise&lt;Hero[]&gt; {
    return new Promise&lt;Hero[]&gt;(resolve =&gt;
      setTimeout(resolve, 2000)) // delay 2 seconds
      .then(() =&gt; this.getHeroes());
  }

  getHero(id: number): Promise&lt;Hero&gt; {
    return this.getHeroes()
               .then(heroes =&gt; heroes.find(hero =&gt; hero.id === id));
  }
}
</code></pre>

<p><a href="https://plnkr.co/edit/yt5pVExpi8ENJ9olKdxD?p=preview" rel="nofollow noreferrer">Plunkr Link</a></p>