title: Angular 2 - How to make a service available at app module level
body: <p>I'm having trouble calling a function inside of a service I thought is being made available globally. I have created a service called <code>SavedNotificationService</code>:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  
  @Injectable()
  export class SavedNotificationService {
  
      private showSavedNotification = false;
  
      show(): void {
          this.showSavedNotification = true;
      }
  
      hide(): void {
          this.showSavedNotification = false;
      }
  
  }
  </code></pre>
  
  <p>And I have imported it in app.module.ts:</p>
  
  <pre><code>import { SavedNotificationService } from "./saved-notification.service";
  @NgModule({
  providers: [SavedNotificationService]
  })
  </code></pre>
  
  <p>But when I want to call a function inside the service it says it can't find it. Although I have made the service available at app.module do I still have to import it on the component I wish to use it? (Like the below example)</p>
  
  <pre><code>@Component({
    providers: [SavedNotificationService]
  })
  </code></pre>