NbLayoutScrollService
Layout scroll service. Provides information about current scroll position, as well as methods to update position of the scroll.
The reason we added this service is that in Nebular there are two scroll modes:
- the default mode when scroll is on body
- and the
withScroll
mode, when scroll is removed from the body and moved to an element inside of thenb-layout
component
Methods
Name | Description |
getPosition() | returns: Observable<NbScrollPosition> Returns scroll position |
onScroll() | returns: Observable<any> Returns a stream of scroll events |
scrollTo() | parameters: x: returns:number , y: number void Sets scroll position |
NbScrollPosition
Scroll position type
Properties
Name | Type | Description |
x | number | x - left |
y | number | y - top |
Previous page
LayoutRulerService
Next page
Need some help or found an issue?
Ask on Stack Overflow with tag `nebular` or post an issue on GitHub.