title: Calculate the sum of width images in a ng-repeat
body: <p>I would like to calculate the sum of width of all the images in the ng-repeat.</p>
  
  <pre><code>&lt;span ng-repeat="result in input.results"&gt;
              &lt;img 
                ng-src="{{pathImage}}/{{result.small}}" 
                imagesize/&gt;
      &lt;/span&gt;
  &lt;p&gt; The size is : {{totalWidth}}&lt;/p&gt;
  </code></pre>
  
  <p>I make a directive imagesize which know the width</p>
  
  <pre><code>app.directive('imagesize', function(){ 
     return {
       restrict: 'A',
       link: function(scope, elem, attr) {
           elem.on('load', function() {
              var w = $(this).width(),
                  h = $(this).height();
  
           });
       }
     };
  });
  </code></pre>
  
  <p>But I don't know how put this sum in totalWidth. </p>