2017-05-04 17:49:33 +08:00
|
|
|
(function () {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
angular
|
|
|
|
|
.module('forums')
|
|
|
|
|
.controller('ForumsController', ForumsController);
|
|
|
|
|
|
2017-07-03 18:00:24 +08:00
|
|
|
ForumsController.$inject = ['$scope', '$translate', 'Authentication', 'MeanTorrentConfig', 'ForumsAdminService'];
|
2017-05-04 17:49:33 +08:00
|
|
|
|
2017-07-03 18:00:24 +08:00
|
|
|
function ForumsController($scope, $translate, Authentication, MeanTorrentConfig, ForumsAdminService) {
|
2017-05-04 17:49:33 +08:00
|
|
|
var vm = this;
|
2017-07-03 18:00:24 +08:00
|
|
|
vm.formsConfig = MeanTorrentConfig.meanTorrentConfig.forumsConfig;
|
|
|
|
|
vm.user = Authentication.user;
|
2017-05-04 17:49:33 +08:00
|
|
|
|
|
|
|
|
vm.init = function () {
|
2017-07-03 18:00:24 +08:00
|
|
|
ForumsAdminService.query({}, function (items) {
|
|
|
|
|
vm.forums = items;
|
|
|
|
|
console.log(items);
|
|
|
|
|
});
|
2017-05-04 17:49:33 +08:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}());
|