title: How to push items into an angular $scope.array?
body: <p>I'm doing something wrong yet I cannot see what (this is probably due to my low AngularJS skills).
  I have a simple ng-repeat in my HTML:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li ng-repeat="fot in fotografia"&gt;&lt;img src="{{fot.path}}"&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>and here is my app.js:</p>
  
  <pre><code>myApp.controller('homeController', function($scope) {
      // fotografia = []; is here only because I get an error otherwise,
      // which means my later for loop can't access the $scope.fotografia
  
      fotografia = [];
      $scope.fotografia = [
          {path:'img/fotografia/fot_1.jpg'},
          {path:'img/fotografia/fot_2.jpg'}
      ];
  
      // I want to add more images with this:
      for(var i=0; i&lt;5; i++) {
          fotografia.push({
              path: 'img/fotografia/fot_'+[i]+'.jpg'
          });
      }
  });
  </code></pre>
  
  <p>Ng-repeat works fine with the 2 images I already have in my array (fot_1.jpg, fot_2.jpg). The loop is the the problem. How do I go about pushing more items into my array?</p>