Last update:
September 16, 2022
Extending Main Menu
Adding New Items to Application Menu¶
Use this code to add new menu items:
.run(
['$rootScope', 'platformWebApp.mainMenuService', '$state', function ($rootScope, mainMenuService, $state) {
//Register module in main menu
var menuItem = {
path: 'browse/unmanaged module',
icon: 'fa fa-cube',
title: 'My cool module',
priority: 110,
state: function () { $state.go('workspace.unmanagedModuleTemplate'); },
permission: 'UnmanagedModulePermission'
};
mainMenuService.addMenuItem(menuItem);
}]);
Note
The priority
property defines the menu position relative to the other menu options. A smaller number means a higher priority, and such a menu item will be displayed first.