Documentation
Other Components
Common

## Shortcuts

This component can be used to show shortcuts to applications, pages or external sources. It can be controlled by the user and any changes will be persisted to the backend if setup correctly.

## Usage

The component only has one input to supply the shortcuts:

<shortcuts [shortcuts]="data.shortcuts"></shortcuts>

## Message

export interface Shortcut { id: string; label: string; description?: string; icon: string; link: string; useRouter: boolean; }

Name | Description
--- | ---
id | Unique id of the shortcut.
label | Label of the shortcut.
description | Description of the shortcut.
icon | Icon name for the shortcut.
link | Link of the shortcut.
useRouter | Whether to use the Router to parse the link.

## Shortcuts Service

The `ShortcutsService` can be used to control the shortcuts outside of the Shortcuts component. This is particularly useful to control the shortcuts from other components for actions like creating, updating or deleting them.

### Methods

Here's the list of all available methods from `ShortcutsService`:

shortcuts$: Observable<Shortcut[]>
Getter for shortcuts.
store(shortcuts: Shortcut[])
Store shortcuts on the service. This will replace the current shortcuts and can be used as an alternative to shortcuts input of the component.
create(shortcut: Shortcut): Observable<Shortcuts>
Create a new shortcut on the server.
update(id: string, shortcut: Shortcut): Observable<Shortcut>
Update the shortcut on the server.
delete(id: string): Observable<boolean>
Delete the shortcut on the server.