File

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

Extends

AbstractSmartComponent

Implements

OnInit

Metadata

providers SmartMenuStructureService
selector smart-hamburger-menu
templateUrl ./smart-hamburger-menu.component.html

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.

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.

<nav class="navbar navbar-default navbar-static-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#smart-hamburger-menu">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
            <div class="navbar-brand">
                <ng-content select="[smart-menu-heading]"></ng-content>
            </div>
        </div>
        <div class="collapse navbar-collapse" id="smart-hamburger-menu">
            <ul class="nav navbar-nav">
                <ng-container *ngFor="let item of menuItems">
                    <li smart-hamburger-menu-item (onSelected)="onItemAction($event)" (openStateChanged)="handleOpenStateChange($event)" [model]="item"
                        [ngClass]="{ 'dropdown-toggle': item.HasChild }"></li>
                </ng-container>
            </ul>
        </div>
    </div>
</nav>
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""