(function () {

    'use strict';

    const versionModule = angular.module('corradeVersion', ['nucleusConstants']);
    versionModule.controller('versionCtrl', ['$scope', '$http', '$timeout', 'cfg.CONSTANTS', function ($scope, $http, $timeout, CONSTANTS) {
        $scope.version = '';
        $http({
            method: 'GET',
            url: urljoin(CONSTANTS.BaseURL, '/version')
        }).then(function successCallback(response, status) {
            $scope.version = response.data;
        }, function errorCallback(data, status) {
            // All hope is lost.
            //alert("all is lost");
        })
    }])

})()

