title: How to use ejs template to run a for loop on the integer array received from angularjs controller
body: <p>Was trying my hands at angularjs with ejs to run a for loop on an integer array received on the ejs template from an angularjs controller. </p>
  
  <p>Following is the code for that: </p>
  
  <pre><code>&lt;div class="form-group" ng-controller="MyController as myCtrl"&gt;
      &lt;div&gt;&lt;label&gt;Trying to run the for loop on {{myCtrl.getMyIntegerArray()}} array&lt;/label&gt;&lt;/div&gt;
      &lt;select class="form-control  input-xsmall inline"&gt;
          &lt;option&gt;Year&lt;/option&gt;
          &lt;% for(var i=0; i &lt;= {{myCtrl.getMyIntegerArray().length}}; i++) { %&gt;
          &lt;option&gt;{{myCtrl.getMyIntegerArray()[i]}}&lt;/option&gt;
          &lt;% } %&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Could somebody help me with it? </p>