maatma: display progress on home page
This commit is contained in:
parent
6dbd0107a0
commit
6000b5dd2e
2 changed files with 18 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ angular.module("AdLinApp")
|
|||
}
|
||||
}).then(function(response) {
|
||||
$rootScope.isLogged = response.data;
|
||||
$rootScope.student = response.data;
|
||||
}, function(response) {
|
||||
$rootScope.isLogged = false;
|
||||
});
|
||||
|
|
@ -63,6 +64,17 @@ angular.module("AdLinApp")
|
|||
}
|
||||
})
|
||||
|
||||
.controller("ProgressionController", function($scope, $interval, $http) {
|
||||
$scope.mychallenges = {};
|
||||
var refreshChal = function() {
|
||||
$http.get("/api/students/" + $scope.student.id + "/progress").then(function(response) {
|
||||
$scope.mychallenges = response.data
|
||||
});
|
||||
}
|
||||
refreshChal();
|
||||
$interval(refreshChal, 15750);
|
||||
})
|
||||
|
||||
.controller("AuthController", function($scope, $rootScope, $http, $location) {
|
||||
$scope.auth = {
|
||||
"username": "",
|
||||
|
|
|
|||
Reference in a new issue