NbThemeService

Main Nebular service. Includes various helper methods.

Methods

NameDescription
appendLayoutClass()
parameters: className: string
returns:void

Append a class to nb-layout

changeTheme()
parameters: name: string
returns:void

Change current application theme

getJsTheme()
returns:Observable<NbJSThemeOptions>

Returns a theme object with variables (color/paddings/etc) on a theme change. Once subscribed - returns current theme.

onAppendLayoutClass()
returns:Observable<any>

Triggered when a new class is added to nb-layout through appendLayoutClass method

onMediaQueryChange()
returns:Observable<NbMediaBreakpoint[]>

Triggers media query breakpoint change Returns a pair where the first item is previous media breakpoint and the second item is current breakpoit.

ts [{ name: 'xs', width: 0 }, { name: 'md', width: 768 }] // change from `xs` to `md`

onRemoveLayoutClass()
returns:Observable<any>

Triggered when a class is removed from nb-layout through removeLayoutClass method

onThemeChange()
returns:Observable<any>

Triggered when current theme is changed

removeLayoutClass()
parameters: className: string
returns:void

Removes a class from nb-layout

Tree Grid
Previous page
MediaBreakpoints
Next page

Need some help or found an issue?

Ask on Stack Overflow with tag `nebular` or post an issue on GitHub.