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
@NgModule({
imports: [SharedModule],
providers: [
addNavMenuSection({
id: 'reports',
label: 'Reports',
items: [{
// ...
}],
},
'settings'),
],
})
export class MyUiExtensionModule {}
Signature
function addNavMenuSection(config: NavMenuSection, before?: string): Provider
Parameters
config
parameter
type:
NavMenuSection
before
parameter
type:
string