feat(forums): add forums server policy & routes & controller

This commit is contained in:
OldHawk
2017-07-03 18:00:24 +08:00
parent fccb6407ee
commit 567f4eed85
13 changed files with 276 additions and 109 deletions

View File

@@ -5,13 +5,18 @@
.module('forums')
.controller('ForumsController', ForumsController);
ForumsController.$inject = ['$scope', '$translate'];
ForumsController.$inject = ['$scope', '$translate', 'Authentication', 'MeanTorrentConfig', 'ForumsAdminService'];
function ForumsController($scope, $translate) {
function ForumsController($scope, $translate, Authentication, MeanTorrentConfig, ForumsAdminService) {
var vm = this;
vm.formsConfig = MeanTorrentConfig.meanTorrentConfig.forumsConfig;
vm.user = Authentication.user;
vm.init = function () {
ForumsAdminService.query({}, function (items) {
vm.forums = items;
console.log(items);
});
};
}
}());