UNPKG

unserver-unify

Version:

29 lines (24 loc) 983 B
'use strict'; angular.module('bamboo').controller('argHomeCtrl', function($scope, $state,loginService, ApiService, $rootScope, fullWidthService, courseBizModel) { $rootScope.fullwidthflag = true; var self = this; self.catBannerUrl = ApiService.SHOST + '/wiki/'; console.log(self.bannerUrl); $scope.$on("$destroy", function() { console.log('-- destroy --'); fullWidthService.listen(); }); if (loginService.school.homepage == "genx" && $state.current.name == "index.home") { return $state.go('index.home.genx'); } $scope.slides = loginService.school.slides; $scope.bannerUrl = ApiService.SHOST + "/public/" + ApiService.RES + "/school/" + ApiService.gid + "/"; // var category = ApiService.category; // console.log(category); //self.categoryKeys = _.keys(category); this.school=loginService.school; courseBizModel.getCategoryInfo().then(function(data) { console.log(data); self.catMap = data; }); });