Skip to content

Controller

renderText()

renderText() — returns void

Available in: controller Category: Rendering Functions

Instructs the controller to render specified text when it’s finished processing the action.

NameTypeRequiredDefaultDescription
textanyyesThe text to render.
// Render just the text "Done!" to the client
renderText("Done!");

// Render serialized product data to the client
products = model("product").findAll();
renderText(SerializeJson(products));