Skip to main content

Enumeration: RouterEvents

@ima/core.RouterEvents

Events constants, which is firing to app.

Enumeration Members

AFTER_HANDLE_ROUTE

AFTER_HANDLE_ROUTE = "$IMA.$Router.afterHandleRoute"

Router fire event $IMA.$Router.afterHandleRoute after page manager handle the route. Event's data contain {response: Object<string, *>, params: Object<string, string>, route: ima.core.router.AbstractRoute, path: string, options: Object<string, *>}}. The response is page render result. The path is current path, the params are params extracted from path, the route is handle route for path and the options is route additional options.

Defined in

packages/core/src/router/RouterEvents.ts:26


AFTER_LOADING_ASYNC_ROUTE

AFTER_LOADING_ASYNC_ROUTE = "$IMA.$Router.afterLoadingAsyncRoute"

Event fired when router finishes loading of async view and controller. If both are sync this is never fired.

Defined in

packages/core/src/router/RouterEvents.ts:38


BEFORE_HANDLE_ROUTE

BEFORE_HANDLE_ROUTE = "$IMA.$Router.beforeHandleRoute"

Router fire event $IMA.$Router.beforeHandleRoute before page manager handle the route. Event's data contain { params: Object<string, string>, route: ima.core.router.AbstractRoute, path: string, options: Object<string, *>}}. The path is current path, the params are params extracted from path, the route is handle route for path and the options is route additional options.

Defined in

packages/core/src/router/RouterEvents.ts:14


BEFORE_LOADING_ASYNC_ROUTE

BEFORE_LOADING_ASYNC_ROUTE = "$IMA.$Router.beforeLoadingAsyncRoute"

Fired right before loading view and controller when either view or controller is async (or both).

Defined in

packages/core/src/router/RouterEvents.ts:32