title: How to instantiate singleton service on module load in Angular2
body: <p>I have a service in angular 2 that in its current form only listens to events from a custom dispatcher, acts on them and sends other events through the dispatcher.</p>
  
  <p>So the service isn't injected anywhere nor do I want it to (it will later be injected in components of lazily loaded modules).</p>
  
  <p>The service resides in a shared module and I export it like so:</p>
  
  <pre><code>export class SharedModule {
    static forRoot(): ModuleWithProviders {
      return {
        ngModule: SharedModule,
        providers: [Dispatcher, AccountService]
      };
    }
  }
  </code></pre>
  
  <p>How do I make sure it gets instantiated when SharedModule loads?</p>