File

src/ui/menu/smart-hamburger-menu/smart-hamburger-menu.component.ts

Extends

AbstractSmartComponent

Implements

OnInit

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(menuStructureService: SmartMenuStructureService)
Parameters :
Name Type Optional
menuStructureService SmartMenuStructureService No

Inputs

expanded
Type : boolean

If set to true, will expand the menu on initialization.

menu-structure-code
Type : string

The structure code that the Smart Menu should use.

selected-item
Type : any

The currently selected menu item.

smart-instance-name
Type : string
smart-object-name
Type : string

The object name of the component

Outputs

selected-item-changed
Type : EventEmitter<any>

Fires when the menu's selection changes.

Methods

handleOpenStateChange
handleOpenStateChange(event: any)
Parameters :
Name Type Optional
event any No
Returns : void
onItemAction
onItemAction(item: HamburgerMenuStructureItem)
Parameters :
Name Type Optional
item HamburgerMenuStructureItem No
Returns : void

Properties

childItems
Type : QueryList<SmartHamburgerMenuItemComponent>
Decorators :
@ViewChildren(SmartHamburgerMenuItemComponent)
menuItems
Type : HamburgerMenuStructureItem[]
Default value : []

The loaded menu items.

<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -                  *
* www.consultingwerk.com and other contributors as listed                *
* below. All Rights Reserved.                                            *
*                                                                        *
*  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY        *
*   KIND, either express or implied.                                     *
*                                                                        *
*  Contributors:                                                         *
*                                                                        *
**************************************************************************

--------------------------------------------------------------------------
    File        : smart-hamburger-menu.component.html
    Purpose     : Template for Smart Hamburger Menu.
    Author(s)   : Radu Nicoara
    Created     : Dec 07, 2017
--------------------------------------------------------------------------
-->
<nav
	class="navbar navbar-expand navbar-light bg-light"
	id="toolbar-menu"
	disableFirstLevelIcons="true"
	role="navigation"
>
	<button
		class="navbar-toggler"
		type="button"
		data-toggle="collapse"
		[attr.data-target]="
			instanceName ? '#' + instanceName : '#bs-navbar-collapse'
		"
		[attr.aria-controls]="instanceName || 'bs-navbar-collapse'"
		aria-expanded="false"
		aria-label="Toggle navigation"
	>
		<span class="navbar-toggler-icon"></span>
	</button>

	<div
		class="collapse navbar-collapse"
		[attr.id]="instanceName || 'bs-navbar-collapse'"
	>
		<div class="navbar-brand">
			<ng-content select="[smart-menu-heading]"></ng-content>
		</div>
		<ul class="navbar-nav">
			@for (item of menuItems; track item) {
			<li
				smart-hamburger-menu-item
				(onSelected)="onItemAction($event)"
				(openStateChanged)="handleOpenStateChange($event)"
				[model]="item"
				[ngClass]="{ 'nav-item': true, dropdown: item.HasChild }"
			></li>
			}
		</ul>
	</div>
</nav>

./smart-hamburger-menu.component.css

/**********************************************************************
 * Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -              *
 * www.consultingwerk.com and other contributors as listed            *
 * below. All Rights Reserved.                                        *
 *                                                                    *
 *  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY    *
 *   KIND, either express or implied.                                 *
 *                                                                    *
 *  Contributors:                                                     *
 *                                                                    *
 **********************************************************************/
/*------------------------------------------------------------------------
    File        : smart-hamburger-menu.component.css
    Purpose     : Styles for Smart Hamburger Menu.
    Author(s)   : Oana Sucigan
    Created     : Sep 08, 2021
  ----------------------------------------------------------------------*/

@media screen and (min-width: 992px) {
    ::ng-deep .navbar-nav {
        flex-direction: column !important;
    }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""