File

core/header/header.service.ts

Description

A service which defines header functions.

Extends

StateService

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.

  • open: Boolean
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
Protected emitNewState
emitNewState()

Emits a new state.

Returns : void
map
map(mappedProperty: (undefined) => void)

Maps to a property and just returns that property.

Parameters :
Name Type Optional Description
mappedProperty function No

The property to map to.

Returns : Observable<any>

Properties

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

Accessors

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

results matching ""

    No results matching ""