Class QueueAbstract

Abstract base class to implement Router Queues. By applying the Target decorator or otherwise providing an implementation of this abstract Queue base class to the Linker, the implemented handle method is called whenever a new Router.State is triggered by navigating. This interceptor-like pattern makes complex routing strategies like asynchronous module-retrieval and the similar tasks easy to be implemented.

Decorator

Provide

Example

Simple Queue stub:

import { Provider, Target } from '@sgrud/core';
import { type Router, type Queue } from '@sgrud/shell';
import { type Observable } from 'rxjs';

⁠@Target()
export class ExampleQueue
extends Provider<typeof Queue>('sgrud.shell.Queue') {

public override handle(
prev: Router.State,
next: Router.State,
queue: Router.Queue
): Observable<Router.State> {
throw new Error('Stub!');
}

}

See

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

[provide]: "sgrud.shell.Queue" = 'sgrud.shell.Queue'

Magic string by which this class is provided.

Methods

Generated using TypeDoc