title: AngularJS: ng-repeat in directive with isolated scope and $last
body: <p>I am trying to catch $last property to be notified when ng-repeat finishes off. I've created special directive for that (<em>ngRepeatDoneNotification</em>). Ng-repeat applies to another element directive (<em>unit</em>). So, there is a construction with three directives:</p>
  
  <pre><code>&lt;unit ng-repeat="unit in collection" ng-repeat-done-notification id="{{unit.id}}"&gt;&lt;/unit&gt;
  </code></pre>
  
  <p>Once I set scope to be isolated, $last disappeared in my notifier directive.</p>
  
  <pre><code>App.directive('ngRepeatDoneNotification', function() {
    return function(scope, element, attrs) {
      if (scope.$last){ // ISSUE IS HERE
        window.alert("im the last!");
      }
    };
  });
  
  App.directive('unit', function() {
    return {
      restrict: 'E',
      replace: true,
      scope: {id: '@'}, // ONCE I ISOLATE SCOPE, $last DISAPPEARED
      templateUrl: '/partials/unit.html',
      link: function(scope, element) {}
    }
  });
  </code></pre>
  
  <p>I've create jsFiddle <a href="http://jsfiddle.net/4erLA/1/" rel="noreferrer">http://jsfiddle.net/4erLA/1/</a></p>
  
  <p>How is it possible to catch this?</p>