app.controller('StdEnrolListCtrl', [ '$rootScope', '$scope', function($rootScope, $scope) { $scope.getEnrolArray = function(){ $rootScope.ajaxRequest({ url : '../enrol/std/enrol/list.htm' }, function(response) { $scope.EnrolArray = response.array; }); } $scope.getEnrolArray(); $scope.goEnrol = function(enrol){ $rootScope.goLocation('enrol/info/' + enrol.enrol_id + '/InActive'); } } ])