@unclepaul/allcountjs
Version:
The open source framework for rapid business application development with Node.js
10 lines (9 loc) • 470 B
JavaScript
angular.module('allcount').controller('IntegrationsController', ['$scope', '$http', function ($scope, $http) {
$scope.loadAvailableIntegrations = function () {
return $http.get('/api/integrations').then(function (resp) {
$scope.integrations = resp.data;
$scope.appIdToIntegration = _.chain(resp.data).map(function (i) { return [i.appId, i] }).object().value();
});
};
$scope.loadAvailableIntegrations();
}]);