Skip to main content

AddNavMenuSection

addNavMenuSection

Add a section to the main nav menu. Providing the before argument will move the section before any existing section with the specified id. If omitted (or if the id is not found) the section will be appended to the existing set of sections. This should be used in the NgModule providers array of your ui extension module.

Example

providers.ts
import { addNavMenuSection } from '@vendure/admin-ui/core';

export default [
addNavMenuSection({
id: 'reports',
label: 'Reports',
items: [{
// ...
}],
},
'settings'),
];
Signature
function addNavMenuSection(config: NavMenuSection, before?: string): Provider

Parameters

config

before

parameter
string