{"size": 780, "ext": "js", "max_stars_repo_path": "public/controllers/giftListsController.js", "max_stars_repo_name": "eric-s-/wrapp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/controllers/giftListsController.js", "max_issues_repo_name": "eric-s-/wrapp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/controllers/giftListsController.js", "max_forks_repo_name": "eric-s-/wrapp", "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": 28.8888888889, "max_line_length": 88, "alphanum_fraction": 0.6282051282}
// This controller displays all gift lists for a specific user

(function () {
    // Define dependencies
    var injectParams = ['$scope', '$rootScope', '$routeParams', 'giftService'];

    var GiftListsController = function ($scope, $rootScope, $routeParams, giftService) {

        $rootScope.isNotLoggedIn = false;
        $rootScope.canRegister = false;
        $rootScope.canLogOut = true;

        // populate view with all gift lists
        function init() {
            giftService.getAllGiftLists().then(function(giftlists) {
                $scope.giftlists = giftlists.data;
            });
        }
        init();
    };

    GiftListsController.$inject = injectParams;

    angular.module('giftApp').controller('GiftListsController', GiftListsController);

}());
