Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <table class="table table-hover">
  2. <thead>
  3. <tr>
  4. <th>#</th>
  5. <th>Username</th>
  6. <th>Class Subjects</th>
  7. </tr>
  8. </thead>
  9. <tbody>
  10. <tr ng-repeat="studentsMember in currentPageElements">
  11. <td>{{$index + 1}}</td>
  12. <td>{{studentsMember.username}}</td>
  13. <td>{{studentsMember.class_subject}}</td>
  14. </tr>
  15. </tbody>
  16.  
  17. function listStudentClassCtrl($scope,UserManager,SchoolService,SingleRequestHandler,TableService) {
  18. $scope.items = {};
  19.  
  20. var listStudentClassDefer;
  21. if(angular.isUndefined(listStudentClassDefer))
  22. {
  23. $scope.loading = true;
  24. listStudentClassDefer = SingleRequestHandler.promiseRequest('ListClassesBySchoolId', {inst_id: SchoolService.getCurrentSchool().institution_id, user_type: 10});
  25. listStudentClassDefer.promise.then(
  26. function(data){
  27. console.info("ListUsers - data ",data);
  28. $scope.staff = data.response;
  29. TableService.elements = $scope.staff;
  30. },
  31. function(httpError){
  32. console.log(httpError);
  33. $scope.alert.stat = true;
  34. })
  35. .finally(function(){
  36. $scope.loading = false;
  37. });
  38. }
  39. }
  40.  
  41. "response":[
  42. {
  43.  
  44. "username":"bingowere ",
  45. "class_subject":"8GEO 3 -- SocialSciences; 8SCI 3 -- Unknown; 8JAP 1 -- Unknown; 8PDH 4 -- Unknown"
  46. },
  47. {
  48. "username":"letbingo ",
  49. "class_subject":"8GEO 2 -- SocialSciences; 8RC 6 -- SocialSciences; 8PDH 1 -- Unknown"
  50. }]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement