File

core/header/header.service.ts

Description

A service which defines header functions.

Index

Properties
Methods
Accessors

Constructor

constructor(navigatorService: NavigatorService, options: OptionsService, humanizeAppName: HumanizeAppNamePipe)
Parameters :
Name Type Optional
navigatorService NavigatorService No
options OptionsService No
humanizeAppName HumanizeAppNamePipe No

Methods

changePageTitle
changePageTitle(newTitle?: string)

Change the page title.

Parameters :
Name Type Optional Description
newTitle string Yes

The new title of the page.

Returns : void
changeTitle
changeTitle(newTitle?: any, pageTitleUpdate: boolean)

Change the application title.

Parameters :
Name Type Optional Default value Description
newTitle any Yes

The new title of the application.

pageTitleUpdate boolean No true
Returns : void
closeNavigator
closeNavigator()

Force to close the navigator.

Returns : void
configNavigator
configNavigator(config: any)

Configures navigation options.

Parameters :
Name Type Optional Default value Description
config any No {}

Object with the properties:

  • open: Boolean
Returns : void
shouldShowBreadcrumbs
shouldShowBreadcrumbs()
Returns : any
toggle
toggle()

Toggles the main header menu in mobile view.

Returns : void
toggleNavigator
toggleNavigator()

Toggles the navigator open status.

Returns : void
verifyIfNavOpen
verifyIfNavOpen()

This methods checks if the navigator toggles on startup or if an item is added to the navigator node. Delay of 300ms is intended for animation purpose.

Returns : void

Properties

Readonly DELAY_TO_AVOID_FLICKERING_ON_ASYNC_NODES
DELAY_TO_AVOID_FLICKERING_ON_ASYNC_NODES: number
Type : number
Default value : 1000
hasItemsInNavigator$
hasItemsInNavigator$:
Default value : this.navigatorService.items$.pipe( delay(this.DELAY_TO_AVOID_FLICKERING_ON_ASYNC_NODES), map(({ length }) => !!length), distinctUntilChanged() )
header$
header$: Observable<Header>
Type : Observable<Header>
headerOpen
headerOpen:
Default value : false
navigatorOpen$
navigatorOpen$: Observable<boolean>
Type : Observable<boolean>
state$
state$: BehaviorSubject<Header>
Type : BehaviorSubject<Header>
Default value : new BehaviorSubject<Header>({ title: undefined, nav: { open: false } })
title
title:
Default value : undefined

Accessors

state
getstate()
navigatorHiddenOnStartup
getnavigatorHiddenOnStartup()
largeWidth
getlargeWidth()
shouldToggle
getshouldToggle()

result-matching ""

    No results matching ""