Include necessary JS files:

  1. <script type="text/javascript" src="../Scripts/jquery-1.9.1.min.js"></script>
  2. <script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
  3. <script type="text/javascript" src="/_layouts/15/sp.js"></script>
  4. <script type="text/javascript" src="../Scripts/angularPlugin/angular.js"></script>
Create 3 JS files for angular modular pattern.
  1. module.js
  2. service.js
  3. controller.js

module.js

service.js

controller.js

The HTML code as follows:

  1. <div ng-app="appModule" ng-controller="appController">
  2. <h1>Angular JS - Sharepoint List Example</h1>
  3. <h2>Employee Info</h2>
  4. <table border="1" cellpadding="10">
  5. <tr>
  6. <th>Employee ID</th>
  7. <th>Employee Name</th>
  8. </tr>
  9. <tr ng-repeat="emp in empInfo">
  10. <td>{{emp.EID}}</td>
  11. <td>{{emp.EmpName}}</td>
  12. </tr>
  13. </table>
  14. </div>
SharePoint List Details

List Name: EmployeeInfo
Column Name Type
EID Single line of Text
EmpName Single line of Text