Back to Expressjs

App Render

_includes/api/en/3x/app-render.md

latest357 B
Original Source
<h3 id='app.render'>app.render(view, [options], callback)</h3>

Render a view with a callback responding with the rendered string. This is the app-level variant of res.render(), and otherwise behaves the same way.

js
app.render('email', function (err, html) {
  // ...
})

app.render('email', { name: 'Tobi' }, function (err, html) {
  // ...
})