title: Passing in a count / counting list items in angular directive
body: <p>Creating a slideshow with Ionic / Angular and just need a way now of passing in the total number of slides.</p>
  
  <p>Currently its hardcoded:</p>
  
  <pre><code>.directive('imageslider', function() {
      return {
          scope : true,
          link: function(scope, element, attrs) {
              // hardcoded here
              scope.totalSlides = 2;
          }
      }
   });
  </code></pre>
  
  <p>My HTML is:</p>
  
  <pre><code>&lt;div imageslider&gt;
      &lt;img ng-repeat="image in tile.data" src="img/product-images/{{image}}"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need a way of getting the amount of img's that are output via the repeat and use that count in my directive.</p>
  
  <p>Thanks.</p>