UNPKG

unserver-unify

Version:

71 lines (68 loc) 1.65 kB
'use strict'; angular.module('bamboo.additional').controller('PartnersCtrl', function(ApiService, $scope) { var self = this; this.photoPath = ApiService.SHOST + '/advinfo/'; function getPartner() { var info = { type: 'school', action: "getpartners" }; ApiService.post('/advinfo', info).then(function(result) { console.log(result); if (result.data.success) { self.partnersList = result.data.data.items; } }); } getPartner(); function getClients() { var info = { start: 0, limit: 200, type: 'school', action:"getUsecaseIcons" }; ApiService.post("/advinfo", info).then(function(result) { console.log(result); if (result.data.success) { self.clientsList = result.data.data.items; } }); } getClients(); this.toggledrop = function() { if ($scope.dropdown) { $scope.dropdown = false; } else { $scope.dropdown = true; } } this.toggledrop1 = function() { if ($scope.dropdown1) { $scope.dropdown1 = false; } else { $scope.dropdown1 = true; } } this.toggledrop2 = function() { if ($scope.dropdown2) { $scope.dropdown2 = false; } else { $scope.dropdown2 = true; } } this.toggledrop3 = function() { if ($scope.dropdown3) { $scope.dropdown3 = false; } else { $scope.dropdown3 = true; } } this.toggledrop4 = function() { if ($scope.dropdown4) { $scope.dropdown4 = false; } else { $scope.dropdown4 = true; } } });