PageManager 

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

Kind: global class


pageManager.init() 

Initializes the page manager.

Kind: instance method of PageManager


pageManager.manage(route, options, [params], [action]) ⇒ Promise.<{status: number, content: ?string, pageState: Object.<string, \*>}> 

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).

Kind: instance method of PageManager
Returns: Promise.<{status: number, content: ?string, pageState: Object.<string, \*>}> - 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). The content field will contain the rendered markup of the page at the server-side, or null at the client-side.

Param Type Default Description
route Route   A route instance that holds information about the page we should manage.
options Object   The current route options.
[params] Object.<string, string> {} The route parameters of the current route.
[action] Object   An action object describing what triggered the routing.

pageManager.destroy() 

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

Kind: instance method of PageManager