/view
The XYZ View API module export the view method required to request application views from the workspace.
View templates maybe localised and must be requested from the languageTemplates utility module.
- Source
Requires
Methods
(async, inner) view(req, res)
The View API method will request a view [template] from the languageTemplates module method.
The optional params.msg string property may have a languageTemplate which should be assigned to the params string before the substitution of template variables.
The view [template] is a HTML string. Template variables defined within a set of brackets {{var}}
will be substituted with params property values before the view string is sent from the HTTP Response object.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
req.params | Object | <optional> | Request params. | |
params.template | string | <optional> | "default_view" | The view template reference. |
params.msg | string | <optional> | The view template reference. | |
params.user | Object | <optional> | Requesting user. |
- Source