Return to v2.1 docs

renderText()


Controller Rendering Functions void controller


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

Name Type Required Default Description
text any Yes The 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));

Related Functions

Rendering Functions