Skip to content
@ng-doc/ui-kit / Class

NgDocFullscreenDirective

Shows its host element fullscreen with the browser Fullscreen API.

supported() stays false on the server and in browsers that do not allow fullscreen (document.fullscreenEnabled), so a control that uses the directive can hide itself there. active() follows the browser's fullscreen state, including an exit with Esc, and the host gets data-ng-doc-fullscreen="true" while it is fullscreen.

Decorators
@Directive
Selectors
[ngDocFullscreen]
DeclarationTypeScript
@Directive({ … })
export class NgDocFullscreenDirective { … }

Members

Constructor

1
()
—

Properties

2
active: Signal<boolean>
readonly

Whether the host is shown fullscreen.

supported: Signal<boolean>
readonly

Whether the browser can show the host fullscreen. Always false on the server.

Methods

3
(): Promise<void>
async

Shows the host fullscreen. Does nothing where fullscreen is not supported, and a request the browser refuses leaves the page as it is.

(): Promise<void>
async

Leaves fullscreen when the host is the fullscreen element.

(): Promise<void>

Enters fullscreen, or leaves it when the host is already fullscreen.

Example usage

Symbol
Kind
Class
Decorators
@Directive
Selectors
[ngDocFullscreen]
Scope
@ng-doc/ui-kit
Edit this page