navbar.ts 758 B

123456789101112131415161718192021222324252627282930313233
  1. ///<reference path="../../../headers/common.d.ts" />
  2. import config from 'app/core/config';
  3. import _ from 'lodash';
  4. import $ from 'jquery';
  5. import coreModule from '../../core_module';
  6. export class NavbarCtrl {
  7. /** @ngInject */
  8. constructor(private $scope, private contextSrv) {
  9. }
  10. }
  11. export function navbarDirective() {
  12. return {
  13. restrict: 'E',
  14. templateUrl: 'public/app/core/components/navbar/navbar.html',
  15. controller: NavbarCtrl,
  16. bindToController: true,
  17. controllerAs: 'ctrl',
  18. transclude: true,
  19. scope: {
  20. title: "@",
  21. titleUrl: "@",
  22. },
  23. link: function(scope, elem, attrs, ctrl) {
  24. ctrl.icon = attrs.icon;
  25. ctrl.subnav = attrs.subnav;
  26. }
  27. };
  28. }
  29. coreModule.directive('navbar', navbarDirective);