title: Karma compiling Angular directive in test
body: <p>Hi I am trying to compile an Angular directive within a Karma test like so:</p>
  
  <pre><code> describe("Midway: Testing My App", function() {
      var $compile, $rootScope;
      beforeEach(module('KSSApp'));
      beforeEach(inject(
          ['$compile','$rootScope', function($c, $r) {
          $compile = $c;
          $rootScope = $r;
          }]
      ));
  
      it("should compile the widget", function() {
         var element = $c('&lt;My-app&gt;&lt;/My-app&gt;')($r);
         console.log(element);
      });
  
  });
  </code></pre>
  
  <p>This however just adds a <code>ng-scope</code> class to the element and does not compile the full directive.</p>