Class ViewResponseFactory

HTTP response factory that uses the ViewEngine service to render a view and send it as HTML.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

data?: {
    [key: string]: any;
}

Optional data that should be passed to the view engine as params.

Type declaration

  • [key: string]: any
targetStatus: HTTPStatus = HTTPStatus.OK

The status that should be set on the response.

viewName: string

The name of the view to render.

Methods