(function () { "use strict"; angular.module("enrDetailsPaneModule") .directive("enrVoterStatistics", [function () { return { templateUrl: "Scripts/EnrAngular/Directives/enrVoterStatistics.html", scope: {}, controller: "enrVoterStatisticsController", restrict: "E" }; }]) .controller("enrVoterStatisticsController", ["$scope", "$rootScope", "jsonDataFetcher", "mapSelectedRegion", "detailsData", function ($scope, $rootScope, jsonDataFetcher, mapSelectedRegion, detailsData) { // load the turnout JSON file into $scope.data jsonDataFetcher.fetchSingleJson("statewideTurnout", true, false, function (jsonResults) { var electionData = jsonResults.root.CountyTurnout; $scope.CountyTurnout = electionData; $rootScope.$broadcast("POP_BUSY_WORKING"); }); }]); }());