{"size": 632, "ext": "js", "max_stars_repo_path": "src/pluto-solutions-hiraeth/controller/plutoSolutionsCustomerControl.js", "max_stars_repo_name": "plutosolutions/pluto-hiraeth", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/pluto-solutions-hiraeth/controller/plutoSolutionsCustomerControl.js", "max_issues_repo_name": "plutosolutions/pluto-hiraeth", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/pluto-solutions-hiraeth/controller/plutoSolutionsCustomerControl.js", "max_forks_repo_name": "plutosolutions/pluto-hiraeth", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.1111111111, "max_line_length": 143, "alphanum_fraction": 0.6598101266}
﻿app.controller("plutoSolutionsCustomerControl", ['$scope', 'plutoSolutionsCustomerService', function ($scope, plutoSolutionsCustomerService) {
    var refresh = function () {
        plutoSolutionsCustomerService.getCustomers().then(function (response) {
            $scope.customers = response.data;
        });
    };

    plutoSolutionsCustomerService.getCustomers().then(function (response) {
        $scope.customers = response.data;
    });

    $scope.addCustomer = function () {
        plutoSolutionsCustomerService.addCustomer($scope.newCustomer).then(function (response) {
            refresh();
        });
    };

}]);