{"size": 1278, "ext": "js", "max_stars_repo_path": "mobile/www/js/controllers.js", "max_stars_repo_name": "soluvas/socmedmon", "max_stars_repo_stars_event_min_datetime": "2016-06-27T06:48:09.000Z", "max_stars_repo_stars_event_max_datetime": "2016-06-27T06:48:09.000Z", "max_issues_repo_path": "mobile/www/js/controllers.js", "max_issues_repo_name": "soluvas/socmedmon", "max_issues_repo_issues_event_min_datetime": "2016-06-27T06:48:41.000Z", "max_issues_repo_issues_event_max_datetime": "2016-07-01T10:25:07.000Z", "max_forks_repo_path": "mobile/www/js/controllers.js", "max_forks_repo_name": "soluvas/socmedmon", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 49.1538461538, "max_line_length": 114, "alphanum_fraction": 0.6525821596}
/// <reference path="../typings/index.d.ts"/>
/// <reference path="services.ts"/>
//import {Page, NavController, NavParams, IonicApp, Content, Alert, Modal, ViewController} from 'ionic-angular';
//import {Http, Headers, URLSearchParams} from 'angular2/http';
//import 'rxjs/Rx';
angular.module('starter.controllers', [])
    .controller('DashboardCtrl', function ($scope, $log, $window, $timeout, $resource, $http) {
    $scope.apiUri = 'http://localhost:8080/api/';
    $scope.refreshSiteSummaries = function () {
        var SiteSummary = $resource($scope.apiUri + 'siteSummaries/:id');
        SiteSummary.get({ sort: ['watchedSite.name', 'watchedSite.siteScreenName'], size: 100 }, function (resp) {
            var siteSummaries = resp._embedded.siteSummaries;
            $scope.siteSummaries = siteSummaries;
            $log.info('Site summaries:', siteSummaries);
            $scope.updateTime = Date.create(siteSummaries[0].modificationTime);
        });
    };
    $http.get('/api/config.json', { responseType: 'json' }).then(function (resp) {
        $scope.apiUri = resp.data.apiUri;
        $log.info('apiUri =', $scope.apiUri, 'from', resp);
        $scope.refreshSiteSummaries();
    }, $scope.refreshSiteSummaries);
});

//# sourceMappingURL=controllers.js.map
