se-hub/templates/js/controllers/tasksController.js

19 lines
624 B
JavaScript
Raw Normal View History

angular.module('SeHub')
2015-08-02 18:46:42 +00:00
.controller('tasksController', ['$scope', '$cookies', '$cookieStore', '$window', '$location', '$mdToast',
'$mdDialog', 'apiService', '$rootScope',
function($scope, $cookies, $cookieStore, $window, $location, $mdToast, $mdDialog, apiService, $rootScope) {
$scope.lecturerTasks = [];
$rootScope.seToken = $cookies['com.sehub.www'];
var token = $rootScope.seToken;
2015-08-02 19:18:17 +00:00
$scope.user = $scope.$parent.user;
apiService.getAllUserTasks(token).success(function(data) {
$scope.tasks = data;
console.log(data);
}).error(function(err) {
console.log(err.message);
});
2015-08-02 18:46:42 +00:00
}
]);