ym_aspect_list.js 495 B

12345678910111213141516171819202122
  1. app.controller('YmAspectListCtrl', [ '$rootScope', '$scope', function($rootScope, $scope) {
  2. $scope.getEnrolArray = function() {
  3. $rootScope.ajaxRequest({
  4. url : '../enrol/std/enrol/list.htm'
  5. }, function(response) {
  6. if (response.array.length == 1) {
  7. $scope.goInfo(response.array[0]);
  8. return;
  9. }
  10. $scope.EnrolArray = response.array;
  11. });
  12. }
  13. $scope.goInfo = function(enrol) {
  14. $rootScope.goLocation('ym/aspect_info/' + enrol.enrol_id);
  15. }
  16. $scope.getEnrolArray();
  17. } ])