text: 'use strict';
  
  angular.module(ApplicationConfiguration.modules.core)
  .controller('HeaderController', [
  	'$scope', 
  	ApplicationConfiguration.services.authentication, 
  	ApplicationConfiguration.services.menu,
  	function($scope, Authentication, Menus) {
  		$scope.authentication = Authentication;
  		$scope.isCollapsed = false;
  		$scope.menu = Menus.getMenu('topbar');
  
  		$scope.toggleCollapsibleMenu = function() {
  			$scope.isCollapsed = !$scope.isCollapsed;
  		};
  
  		// Collapsing the menu after navigation
  		$scope.$on('$stateChangeSuccess', function() {
  			$scope.isCollapsed = false;
  		});
  	}
  ]);