title: Fetch data from database and use it in ng-repeat in AngularJS
body: <p>In AngularJS, you can use ng-repeat to show each component of a list to HTML:</p>
  
  <pre><code>&lt;div ng-app&gt;
      &lt;div ng-controller="myctrl"&gt;
          &lt;div ng-repeat="row in lists"&gt;
              &lt;p&gt;{{row.first}}&lt;/p&gt;
              &lt;p&gt;{{row.last}}&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However, in the above code, you have to write each component of a list first, which should be fetched from database manually before using it in the above HTML. So is there any way to directly fetch data from MySQL in Node.js and Express and render it to .ejs file, and then use the rendered list in AngularJS?</p>