define([ 'angular', 'kbn' ], function (angular) { 'use strict'; angular .module('grafana.directives') .directive('topnav', function($rootScope, contextSrv) { return { restrict: 'E', transclude: true, scope: { title: "@", section: "@", titleAction: "&", subnav: "=", }, template: '
', link: function(scope, elem, attrs) { scope.icon = attrs.icon; scope.contextSrv = contextSrv; scope.toggle = function() { $rootScope.appEvent('toggle-sidemenu'); }; } }; }); });