new ClientPageRenderer(factory, Helper, ReactDOM, settings, window)
Initializes the client-side page renderer.
Parameters:
Name | Type | Description |
---|---|---|
factory |
PageRendererFactory | Factory for receive $Utils to view. |
Helper |
vendor.$Helper | The IMA.js helper methods. |
ReactDOM |
vendor.ReactDOM | React framework instance to use to render the page on the client side. |
settings |
Object.<string, *> | The application setting for the current application environment. |
window |
Window | Helper for manipulating the global object
( |
Members
-
_firstTime :boolean
-
Flag signalling that the page is being rendered for the first time.
Type:
- boolean
-
<nullable> _viewContainer :HTMLElement
-
The HTML element containing the current application view for the current route.
Type:
- HTMLElement
-
_window :Window
-
Helper for manipulating the global object (
window
) regardless of the client/server-side environment.Type:
Methods
-
_handleError(error)
-
Show error to console in $Debug mode and re-throw that error for other error handler.
Parameters:
Name Type Description error
Error Throws:
-
Re-throws the handled error.
- Type
- Error
-
-
_patchPromisesToState(controller, patchedPromises)
-
Patch promise values to controller state.
Parameters:
Name Type Description controller
ControllerDecorator patchedPromises
Object.<string, Promise.<*>> -
_renderToDOM(controller, view, routeOptions)
-
Renders the current route to DOM.
Parameters:
Name Type Description controller
ControllerDecorator view
function routeOptions
Object The current route options.
-
_separatePromisesAndValues(dataMap)
-
Separate promises and values from provided data map. Values will be use for default page state. Promises will be patched to state after their resolve.
Parameters:
Name Type Description dataMap
Object.<string, *> A map of data.
Returns:
Return separated promises and other values.
- Type
- Object
-
_updateMetaAttributes(metaManager)
-
Updates the title and the contents of the meta elements used for SEO.
Parameters:
Name Type Description metaManager
MetaManager meta attributes storage providing the new values for page meta elements and title.
-
_updateMetaLinkAttributes(metaManager)
-
Updates the href of the specialized link elements used for SEO.
Parameters:
Name Type Description metaManager
MetaManager meta attributes storage providing the new values for page meta elements and title.
-
_updateMetaNameAttributes(metaManager)
-
Updates the contents of the generic meta elements used for SEO.
Parameters:
Name Type Description metaManager
MetaManager meta attributes storage providing the new values for page meta elements and title.
-
_updateMetaPropertyAttributes(metaManager)
-
Updates the contents of the specialized meta elements used for SEO.
Parameters:
Name Type Description metaManager
MetaManager meta attributes storage providing the new values for page meta elements and title.
-
mount()
-
-
unmount()
-
-
update()
-