Files
meanTorrent/modules/core/client/controllers/header.client.controller.js
Ryan Hutchison b2462ec86c feat(core): Modify core module to implement style guidelines.
Update the core module to implement the style guidelines.
Reduce size of init.js - moved filter logic out to it's own config.
Rename Menus to menuService
2016-03-23 15:41:57 -04:00

26 lines
662 B
JavaScript

(function () {
'use strict';
angular
.module('core')
.controller('HeaderController', HeaderController);
HeaderController.$inject = ['$scope', '$state', 'Authentication', 'menuService'];
function HeaderController($scope, $state, Authentication, menuService) {
var vm = this;
vm.accountMenu = menuService.getMenu('account').items[0];
vm.authentication = Authentication;
vm.isCollapsed = false;
vm.menu = menuService.getMenu('topbar');
$scope.$on('$stateChangeSuccess', stateChangeSuccess);
function stateChangeSuccess() {
// Collapsing the menu after navigation
vm.isCollapsed = false;
}
}
}());