Skip to main content

Class: abstract PageManager

Defined in: packages/core/src/page/manager/PageManager.ts:16

The page manager is a utility for managing the current controller and its view.

Extended by

Constructors

new PageManager()

new PageManager(): PageManager

Returns

PageManager

Methods

destroy()

destroy(): Promise<unknown>

Defined in: packages/core/src/page/manager/PageManager.ts:68

Finalization callback, called when the page manager is being discarded. This usually happens when the page is hot-reloaded at the client side.

Returns

Promise<unknown>


init()

init(): void

Defined in: packages/core/src/page/manager/PageManager.ts:20

Initializes the page manager.

Returns

void


manage()

manage(args): Promise<unknown>

Defined in: packages/core/src/page/manager/PageManager.ts:53

Starts to manage the provided controller and its view. The manager stops the management of any previously managed controller and view.

The controller and view will be initialized and rendered either into the UI (at the client-side) or to the response to send to the client (at the server-side).

Parameters

args

ManageArgs

Returns

Promise<unknown>

A promise that will resolve to information about the rendered page. The status will contain the HTTP status code to send to the client (at the server side) or determine the type of error page to navigate to (at the client side).


postManage()

postManage(): void

Defined in: packages/core/src/page/manager/PageManager.ts:60

Called by router after currently managed route is resolved.

Returns

void


preManage()

preManage(): Promise<void>

Defined in: packages/core/src/page/manager/PageManager.ts:30

Pre manage handler, should be called and awaited before tryint to handle new route handler. This pre manage takes care of canceling any currently executed route handlers and returns promise which is resolved when previous page finished loading (even if it got canceled).

Returns

Promise<void>