course details changes done
This commit is contained in:
parent
bedf13b2bd
commit
602dfdf939
43
Apollo/assets/js/controllers/studentViewCtrl.js
Normal file
43
Apollo/assets/js/controllers/studentViewCtrl.js
Normal file
@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('studentViewCtrl', ["$scope","$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
||||
/*
|
||||
* used to get student course details
|
||||
* this method called from view ng-init directive
|
||||
* created by kms
|
||||
* */
|
||||
|
||||
$scope.getStudentDetails = function () {
|
||||
var getcourse = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getStudentBasicInfo/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
|
||||
}
|
||||
};
|
||||
$http(getcourse).then(function (response) {
|
||||
|
||||
if (response.data.status == 200 && response.data.studentStatus== true) {
|
||||
$scope.studentDetails = response.data.studentDetails;
|
||||
$scope.courseDetails = response.data.courseDetails;
|
||||
|
||||
|
||||
} else {
|
||||
$scope.studentDetails = "";
|
||||
$scope.courseDetails = "";
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
}]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user