Skip to content
@ng-doc/app / Class

NgDocCommandPaletteComponent

The search palette: a search field with scopes (all, guides, API and actions), a list of results grouped by type (guides first, then the API), a preview of the selected result and the switch for single-key shortcuts. The navbar search opens it with Command+K (Control+K) or the slash key.

Decorators
@Component
Selectors
ng-doc-command-palette
DeclarationTypeScript
@Component({ … })
export class NgDocCommandPaletteComponent { … }

Members

Constructor

1
()
—

Properties

14
active: WritableSignal<number>
protectedreadonly
—
emptyMessage: Signal<string>
protectedreadonly
—
failed: Signal<boolean>
protectedreadonly
—
model: WritableSignal<{ query: string; }>
protectedreadonly
—
query: Signal<string>
protectedreadonly
—
rows: Signal<Row[]>
protectedreadonly
—
protectedreadonly
—
scopes: readonly { id: NgDocCommandPaletteScope; label: string; }[]
protectedreadonly
—
searchForm: FieldTree<{ query: string; }, string | number, "writable">
protectedreadonly
—
searching: Signal<boolean>
protectedreadonly
—
sections: Signal<Section[]>
protectedreadonly
—
selected: Signal<Row>
protectedreadonly
—
protectedreadonly
—
status: Signal<string>
protectedreadonly

What the status region announces: the scope, a running search, no results or a failure.

Methods

6
(…): void
protected

Opens the given result: navigates to a page or runs an action.

(…): void
protected

Selects the result under the pointer, without scrolling the list.

(…): void
protected

Handles the keys of the search field: the arrow keys move the selection and Enter opens the selected result. Keys that compose text in an input method editor are left alone.

(…): void
protected

Handles the keys of the scope tabs: the arrow keys, Home and End select and focus a scope.

(…): void
protected

Keeps Tab inside the palette: from its last tab stop focus wraps to the search field, and Shift+Tab from the search field goes to the last tab stop.

(…): void
protected

Selects a scope by click and returns the focus to the search field.

Symbol
Kind
Class
Decorators
@Component
Selectors
ng-doc-command-palette
Scope
@ng-doc/app
Edit this page