title: How to subscribe to event emitter once?
body: <pre><code>// Part of service
  public someEvent: EventEmitter&lt;number&gt; = new EventEmitter();
  
  ....
  
  // Component
  @Component({
    selector: 'some-component',
    template: `...`
  })
  export class SomeComponent {
    constructor(public service: Service) {
      this.service.someEvent.subscribe((x) =&gt; {
        // Do something
      });
    }
  }
  </code></pre>
  
  <p><code>SomeComponent</code> is displayed in <code>/</code> route. When I navigate to different route in my application, and come back again, <code>SomeComponent</code> will subscribe to the event again, causing callback to fire twice. How to subscribe to the event once or unsubscribe on destroy of the component and subscribe again?</p>
  
  <pre><code>// Can't subscribe after.
  ngOnDestroy() {
    this.service.someEvent.unsubscribe();
  }
  </code></pre>