angular .module('portainer') .directive('rdHeaderContent', ['Authentication', function rdHeaderContent(Authentication) { var directive = { requires: '^rdHeader', transclude: true, link: function (scope, iElement, iAttrs) { scope.username = Authentication.getUserDetails().username; }, template: '', restrict: 'E' }; return directive; }]);