File

core/tabs/tabs.service.ts

Description

A service which defines the used tabs.

Extends

StateService

Index

Properties
Methods
Accessors

Constructor

constructor(rootInjector: Injector, router: Router, translateService: TranslateService, options: OptionsService)
Parameters :
Name Type Optional
rootInjector Injector No
router Router No
translateService TranslateService No
options OptionsService No

Methods

add
add(item: Tab)

Adds a new item to tabs and emits state change

Parameters :
Name Type Optional Description
item Tab No

The item to add.

Returns : void
areAvailable
areAvailable(tabLabels: string[])

Checks if at least one of the tabs is available.

Parameters :
Name Type Optional Description
tabLabels string[] No

The array of tab labels to check.

Returns : boolean

Returns true if at least one of the tabs is available.

prepareTabs
prepareTabs(tabs)
Parameters :
Name Optional
tabs No
Returns : any
refresh
refresh()

Refresh the extension factories

Returns : void
remove
remove(item: Tab)

Removes a tab and emits a state change.

Parameters :
Name Type Optional Description
item Tab No

The item to remove.

Returns : void
sortTabs
sortTabs(tabs)
Parameters :
Name Optional
tabs No
Returns : any
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

factories
Type : TabExtension[]
Default value : []

Additional factories that can be added by plugins.

injectors
Type : []
Default value : [this.rootInjector]
items$
Type : Observable<Tab[]>
orientation$
Type : Observable<"vertical" | "horizontal">
Readonly refreshTrigger
Default value : new Subject()
Readonly state$
Default value : new BehaviorSubject<Set<Tab>>(new Set<Tab>())

Accessors

state
getstate()

Returns the current state.

Returns : Set<Tab>
firstTab$
getfirstTab$()

results matching ""

    No results matching ""