title: How to integrate ASP.NET 5 with signalr
body: <p>I'm trying to make an ASP.NET 5 web app using SignalR. I've created an empty web app, I've added an index.html page with some contents but I can't integrate SignalR. So far, in order to use SignaR, I've carried out the following step:</p>
  
  <p>1) I've added the following dependency in the project.json file:</p>
  
  <pre><code>"Microsoft.AspNet.SignalR.Server": "3.0.0-rc1-final"
  </code></pre>
  
  <p>2) In the Startup class, I've added </p>
  
  <pre><code>services.AddSignalR();
  </code></pre>
  
  <p>to the ConfigureServices method, and</p>
  
  <pre><code>app.UseSignalR();
  </code></pre>
  
  <p>to the Configure method.</p>
  
  <p>3) I've added to the project a class deriving from Microsoft.AspNet.SignalR.Hub and inserted a public method into it.</p>
  
  <p>After this, in index.html I've added the logic trying to access the method but when I launch the app firefox console says </p>
  
  <blockquote>
    <p>Error: $ is not defined</p>
  </blockquote>
  
  <p>Here is the javascript code:</p>
  
  <pre><code>&lt;script&gt;
          var app = angular.module("myapp", []);
          app.controller("myctr", function ($scope) {
              $scope.input = "";
              $scope.output = "";
              $.connection.myHub1.client.JSMet1 = function (x) {
                  $scope.$apply(function () {
                      $scope.output = x;
                  });
              };
              $scope.AggiornaTesto = function () {
                  $.connection.myHub1.server.cSMet1($scope.input);
              };
              $.connection.hub.start();
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>As you can see I also use AngulaJS.</p>