Service for sidebar, it can be used to hide/show sidebar or to check if sidebar is collapsable.
On wide screens the sidebar is always shown. At and below it is an overlay: show() opens it and blocks page scrolling, hide() closes it, and a navigation or a resize to a wide screen ends the overlay.
- Decorators
@Service
DeclarationTypeScript
@Service ()
export class NgDocSidebarService { … }Members
Constructor1 | |
() | — |
Signature | |
Properties6 | |
document: Document | — |
expanded: | — |
expandedState: | Whether the sidebar is shown, as a signal. It follows the same state as |
router: | — |
scroll: | — |
window: Window | — |
Accessors1 | |
get isMobile: boolean | Whether the viewport is narrow enough for the sidebar to be an overlay. |
Methods4 | |
(): void | Hide sidebar, and unblock scrolling. |
Signature Returns void | |
(): | Indicates if sidebar is visible, based on the show/hide methods. Read |
Signature Returns | |
(): void | Show sidebar, and block scrolling. |
Signature Returns void | |
(): void | Toggle sidebar visibility. |
Signature Returns void | |
No members match.