title: AngularJS with SignalR
body: <p>I am playing with Angular and SignalR, I have tried to create a service which will act as a manager.</p>
  
  <pre><code>dashboard.factory('notificationsHub', function ($scope) {
    var connection;
    var proxy;
  
    var initialize = function () {
      connection = $.hubConnection();
      proxy = connection.createHubProxy('notification');
  
      proxy.on('numberOfIncidents', function (numOfIncident) {
        console.log(numOfIncident);
        $scope.$emit('numberOfIncidents', numOfIncident);
      });
  
      connection.start()
        .done(function() {
          console.log('Connected');
        })
       .fail(function() { console.log('Failed to connect Connected'); });
    };
  
    return {
      initialize: initialize
    };
  });
  </code></pre>
  
  <p>however I get the error <code>Error: Unknown provider: $scopeProvider &lt;- $scope &lt;- notificationsHub</code>.</p>
  
  <p>How can I use <code>pubsub</code> to pass all the notifications to the controllers? jQuery maybe?</p>