'use strict';

var LibraryTypeDetailsController = angular.module('libraries.controllers.glibrarytype', [
    'system'
])
    .controller('LibraryTypeDetailsController', [
        '$scope',
        '$route',
        '$location',
        'System',
        'LibraryService',
        'ImageService',
        function ($scope, $route, $location, System, LibraryService, ImageService) {
            var id = $route.current.params["id"];

            $scope.load = function () {
                LibraryService.get(id)
                    .then(function(data) {
                        $scope.librarytypes = data;
                    });

                ImageService.query().then(function(data) {
                    $scope.images = data;
                });
            };
            

            $scope.back = function() {
                $location.url('/libraries');
            };

            $scope.load();

        }
    ]);