title: How to throw event in Angular2 when signalR called the client
body: <p>In a SignalR-Service inside my angular2-Application I want to broadcast an event when I received an event from the server.</p>
  
  <pre><code>@Injectable() export class SignalRService {
  
     //...
      private emitMe: EventEmitter&lt;any&gt;;
  
  constructor() {
          this.emitMe = new EventEmitter();
          this.connection = jQuery.hubConnection(".../signalr/");
          this.proxy = this.connection.createHubProxy("...");
          this.wireupEvents();
          //...
      }
  
  wireupEvents(): void {
      this.proxy.on('ItemAdded', function(data) {
              console.log('received ItemAdded' + JSON.stringify(data));
                  //How to throw event here??? Like $rootScope.$emit('itemAdded', data);
                  // 'this.emitMe' is not reachable here
              });
      }
  }
  </code></pre>
  
  <p>How can I access the EventEmitter which I initialized and throw an event that I can subscribe from the outside to it?</p>
  
  <p>Thanks</p>
  
  <p>Regards Tenoda</p>