title: Life-cycle methods for services in angular2
body: <p>Is it possible to have life-cycle hooks for a service that is annotated with <code>@Injectable()</code>?</p>
  
  <p>I'd have expected the life-cycle hooks to be called on a service like this, but I was proven wrong, it seems to be working on <code>@Component</code> only. Is there a way to get informed in a service when dependency injection creates / destroys a service?</p>
  
  <pre><code>import {Component, Injectable, OnInit, OnDestroy} from 'angular2/core';
  
  @Injectable()
  export class SampleService implements OnInit, OnDestroy {
      ngOnInit() {
          console.log("OnInit")
      }
      ngOnDestroy() {
          console.log("OnDestroy")
      }
  }
  
  @Component({
    selector: "sample",
    template: "&lt;div&gt;Sample Component&lt;/div&gt;",
    providers: [ SampleService ]
  })
  export class SampleComponent {
    constructor() { private _sampleService: SampleService }
  }
  </code></pre>