mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-14 11:22:21 +01:00
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
26 lines
662 B
JavaScript
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;
|
|
}
|
|
}
|
|
}());
|