2016-06-26 22:00:58 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('ffffng')
|
2017-05-06 18:40:59 +02:00
|
|
|
.directive('fFooter', function ($http, config) {
|
|
|
|
var pathPrefix = config.rootPath === '/' ? '' : config.rootPath;
|
|
|
|
|
2016-06-26 22:00:58 +02:00
|
|
|
var ctrl = function ($scope) {
|
|
|
|
$scope.version = '?';
|
2017-05-06 18:40:59 +02:00
|
|
|
$http.get(pathPrefix + '/api/version')
|
2017-05-06 17:31:34 +02:00
|
|
|
.then(function (result) { $scope.version = result.data.version; });
|
2016-06-26 22:00:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
'controller': ctrl,
|
|
|
|
'restrict': 'E',
|
|
|
|
'templateUrl': 'views/directives/footer.html'
|
|
|
|
};
|
|
|
|
});
|