UNPKG

unserver-unify

Version:

17 lines (15 loc) 598 B
angular.module('bamboo.school').controller("schoolCtrl", function(ApiService, $scope,$stateParams) { var self = this; this.schoolkey = $stateParams.key; $scope.school = null; this.schoolurl = ApiService.SHOST + "/public/" + ApiService.RES + "/school/"; ApiService.get('/getSchoolId/' + self.schoolkey).then(function(result) { if (result.data.success) { $scope.school = result.data.school; $scope.school.url = '//' + $scope.school.key + "." + ApiService.BASEDOMAIN; console.log($scope.school); }else{ console.log("error"); }; }); });