title: angular's element.isolateScope() returns undefined
body: <p>I'm writing a test for <a href="https://stackoverflow.com/questions/27393759/angular-directive-does-not-update-as-scope-updates">this directive</a>, and I believe I'm doing it correctly, but when I try to access the isolateScope, I get undefined.</p>
  
  <p>Directive:</p>
  
  <pre><code>describe('directive: deposit-note', function() {
    var expect = chai.expect;
  
    var element,
        scope,
        $rootScope,
        $compile,
        $httpBackend;
  
    beforeEach(module('directives.depositnote'));
  
    beforeEach(inject(function (_$compile_, _$rootScope_) {
        $compile = _$compile_;
        $rootScope = _$rootScope_;
    }));
  
    beforeEach(inject(function($injector) {
      $httpBackend = $injector.get('$httpBackend');
    }));
  
    describe('with a filled-out transaction object', function() {
  
      beforeEach(inject(function($injector) {
        $httpBackend.whenGET('/templates/depositnote.tpl.html').respond(200, '');
        scope = $rootScope.$new();
  
        element = '&lt;deposit-note checknumber="transaction.checkNumber" checktype="transaction.checkType.value" depositnote="transaction.depositNote" /&gt;';
  
        scope.transaction = {
          "checkNumber": "1234",
          "checkType": "CASHIERS CHK",
          "depositNote": "In Person"
        };
  
        element = $compile(element)(scope);
        scope.$digest();
      }));
  
      it("should calculate the correct remaining characters", function() {
        var isolated = element.isolateScope();
        expect(isolated.totalRemaining).toBe(17);
      });  
    });
  });
  </code></pre>
  
  <p>When I step through this, I see element get compiled, and chrome's devtools shows that <code>element.isolateScope()</code> is indeed a method on element, but it returns undefined.</p>
  
  <p>What am I missing?</p>