title: Angularjs - How to 'ng-repeat' a div for 'value in ng-model'-times?
body: <p>Using Angularjs, I want to create say 10 <code>&lt;div&gt;</code> if user inputs '10' in a text box. </p>
  
  <pre><code>&lt;input type="text" id="gcols" placeholder="Number of Columns" ng-model="cols"/&gt;
  </code></pre>
  
  <p>So whatever value user enters in this box, those many  shall be created. So my generalized question is, how to 'ng-repeat' a <code>&lt;div&gt;</code> for 'ng-model' times?</p>
  
  <p><strong>UPDATE:</strong>
  Appreciating for all of your answers, I did something like following, by referring your answers. And that is working as of now, but tell me if any other logic is more efficient than this.</p>
  
  <pre><code>$scope.divs = new Array();
  
      $scope.create=function(){ //I added a button &amp; invoked this function on its ng-click
              var a = $scope.cols;
              for(i=0;i&lt;a;i++)
              {
                  $scope.divs.push(a);
              }
              alert($scope.divs);
          };
  </code></pre>