ffffng/app/scripts/directives/footer.js

19 lines
490 B
JavaScript
Raw Permalink Normal View History

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