mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-21 19:41:33 +00:00
16 lines
420 B
Plaintext
16 lines
420 B
Plaintext
section
|
|
h3(id='app.render') app.render(view, [options], callback)
|
|
|
|
p.
|
|
Render a <code>view</code> with a callback responding with
|
|
the rendered string. This is the app-level variant of <code>res.render()</code>,
|
|
and otherwise behaves the same way.
|
|
|
|
+js.
|
|
app.render('email', function(err, html){
|
|
// ...
|
|
});
|
|
|
|
app.render('email', { name: 'Tobi' }, function(err, html){
|
|
// ...
|
|
}); |