working on supervisors list

parent b0215055
......@@ -131,7 +131,7 @@ dashboardApp.config(function ($stateProvider, $urlRouterProvider) {
url: '/supervisors_list',
parent: 'supervisor',
templateUrl: 'modules/supervisor/views/supervisors_list.html',
controller: 'SupervisorCtrl',
controller: 'SupervisorsCtrl',
})
// Abstract page for student
.state('student', {
......
'use strict';
//--------------------------
// Admin Supervisors Controller
//--------------------------
dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisorsCtrl($scope, $window, $http, config, $translate, ngToast) {
// List of supervisors
$http
.get(config.backend+'/sup/all')
.success(function(data, status, headers, config) {
$scope.supervisors = data;
})
.error(function(data, status, headers, config) {
$translate('error_downloading_supervisors').then(function (translation) {
ngToast.danger({ content: translation });
});
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment