Class IgxNavbarComponent

Ignite UI for Angular Navbar - Documentation

The Ignite UI Navbar is most commonly used to provide an app header with a hamburger menu and navigation state such as a "Go Back" button. It also supports other actions represented by icons.

Example:

<igx-navbar title="Sample App" actionButtonIcon="menu">
  <igx-icon>search</igx-icon>
  <igx-icon>favorite</igx-icon>
  <igx-icon>more_vert</igx-icon>
</igx-navbar>

Hierarchy

  • IgxNavbarComponent

Properties

actionButtonIcon

actionButtonIcon: string

An @Input property that sets the icon of the IgxNavbarComponent.

<igx-navbar [title]="currentView" actionButtonIcon="arrow_back"></igx-navbar>

id

id: string = `igx-navbar-${NEXT_ID++}`

An @Input property that sets the value of the id attribute. If not provided it will be automatically generated.

<igx-navbar [id]="'igx-navbar-12'" title="Sample App" actionButtonIcon="menu">

onAction

onAction: EventEmitter<IgxNavbarComponent> = new EventEmitter<IgxNavbarComponent>()

The event that will be thrown when the action is executed, provides reference to the IgxNavbar component as argument

public actionExc(event){
   alert("Action Execute!");
}
//..
<igx-navbar (onAction)="actionExc($event)" title="Sample App" actionButtonIcon="menu">

title

title: string

An @Input property that sets the title of the IgxNavbarComponent.

<igx-navbar title="Sample App" actionButtonIcon="menu">

titleId

titleId: string = `igx-navbar-${IgxNavbarComponent.NEXT_ID++}`

An @Input property that sets the titleId of the IgxNavbarComponent. If not set it will be automatically generated.

<igx-navbar [titleId]="'igx-navbar-7'" title="Sample App" actionButtonIcon="menu">

Accessors

isActionButtonVisible

  • get isActionButtonVisible(): boolean
  • set isActionButtonVisible(value: boolean): void
  • Returns whether the IgxNavbarComponent action button is visible, true/false.

    @ViewChild("MyChild")
    public navBar: IgxNavbarComponent;
    ngAfterViewInit(){
       let actionButtonVisibile = this.navBar.isActionButtonVisible;
    }

    Returns boolean

  • Sets whether the action button of the IgxNavbarComponent is visible.

    <igx-navbar [title]="currentView" [isActionButtonVisible]="'false'"></igx-navbar>

    Parameters

    • value: boolean

    Returns void