Skip to content
Myr

More view docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 1fb73e2 · Browse files · 10 files+65 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

10 files+65 added−8 removed

  • other:+65 added−8 removed

10 files+65 added−8 removed

modified:docs/layout/head.html+1 added-1 removed
modified:docs/api.html+1 added-1 removed
926 unmodified lines
927928<p> Most engines accept one or more of the following options,929 both <em>haml</em> and <em>jade</em> accept all:</p>930931<ul><li><code>context</code> Template evaluation context (<code>this</code>)</li><li><code>locals</code> Object containing local variables</li><li><code>filename</code> Filename used for the <code>cache</code> option</li><li><code>cache</code> Cache intermediate JavaScript in memory</li><li><code>debug</code> Output debugging information</li></ul>931<ul><li><code>context|scope</code> Template evaluation context (<code>this</code>)</li><li><code>locals</code> Object containing local variables</li><li><code>filename</code> Filename used for the <code>cache</code> option</li><li><code>cache</code> Cache intermediate JavaScript in memory</li><li><code>debug</code> Output debugging information</li></ul>932933<h2></h2>934935<ul><li><p><strong>param</strong>: <em>String</em> view</p></li><li><p><strong>param</strong>: <em>Object</em> options</p></li><li><p><strong>param</strong>: <em>Function</em> fn</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
97 unmodified lines
modified:docs/contrib.html+1 added-1 removed
122 unmodified lines
123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127 padding: 1px 0;127 padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;
94 unmodified lines
modified:docs/executable.html+1 added-1 removed
122 unmodified lines
123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127 padding: 1px 0;127 padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;
71 unmodified lines
modified:docs/guide.1+23 added
680 unmodified lines
681.682.P683Express supports \"redirect mapping\", which by default provides \fIhome\fR, and \fIback\fR\. The \fIback\fR map checks the \fIReferrer\fR and \fIReferer\fR headers, while \fIhome\fR utilizes the \"home\" setting and defaults to \"/\"\.684.685.SS "res\.render(view[, options[, fn]])"686Render \fIview\fR with the given \fIoptions\fR and optional callback \fIfn\fR\. When a callback function is given a response will \fInot\fR be made automatically, however otherwise a response of \fI200\fR and \fItext/html\fR is given\.687.688.P689Most engines accept one or more of the following options, both haml \fIhttp://github\.com/visionmedia/haml\.js\fR and jade \fIhttp://github\.com/visionmedia/jade\fR accept all:690.691.IP "\(bu" 4692\fIcontext|scope\fR Template evaluation context (\fIthis\fR)693.694.IP "\(bu" 4695\fIlocals\fR Object containing local variables696.697.IP "\(bu" 4698\fIfilename\fR Filename used for the \fIcache\fR option699.700.IP "\(bu" 4701\fIcache\fR Cache intermediate JavaScript in memory702.703.IP "\(bu" 4704\fIdebug\fR Output debugging information705.706.IP "" 0707.708.SS "app\.set(name[, val])"709Apply an application level setting \fIname\fR to \fIval\fR, or get the value of \fIname\fR when \fIval\fR is not present:710.711.IP "" 4
172 unmodified lines
modified:docs/guide.html+20 added-1 removed
122 unmodified lines
123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127 padding: 1px 0;127 padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;
56 unmodified lines
188<li><a href="#res-sendfile-path-">res.sendfile()</a></li>189<li><a href="#res-download-file-filename-">res.download()</a></li>190<li><a href="#res-send-body-status-headers-status-status-">res.send()</a></li>191<li><a href="#res-redirect-url-status-">res.redirect()</a></li>192<li><a href="#res-render-view-options-fn-">res.render()</a></li>193<li><a href="#app-set-name-val-">app.set()</a></li>194<li><a href="#app-enable-name-">app.enable()</a></li>195<li><a href="#app-disable-name-">app.disable()</a></li>196<li><a href="#app-configure-env-function-function-">app.configure()</a></li>
477 unmodified lines
674<p>Express supports "redirect mapping", which by default provides <em>home</em>, and <em>back</em>.675The <em>back</em> map checks the <em>Referrer</em> and <em>Referer</em> headers, while <em>home</em> utilizes676the "home" setting and defaults to "/".</p>677678<h3 id="res-render-view-options-fn-">res.render(view[, options[, fn]])</h3>679680<p>Render <em>view</em> with the given <em>options</em> and optional callback <em>fn</em>.681When a callback function is given a response will <em>not</em> be made682automatically, however otherwise a response of <em>200</em> and <em>text/html</em> is given.</p>683684<p> Most engines accept one or more of the following options,685 both <a href="http://github.com/visionmedia/haml.js">haml</a> and <a href="http://github.com/visionmedia/jade">jade</a> accept all:</p>686687<ul>688<li><em>context|scope</em> Template evaluation context (<em>this</em>)</li>689<li><em>locals</em> Object containing local variables</li>690<li><em>filename</em> Filename used for the <em>cache</em> option</li>691<li><em>cache</em> Cache intermediate JavaScript in memory</li>692<li><em>debug</em> Output debugging information</li>693</ul>694695696<h3 id="app-set-name-val-">app.set(name[, val])</h3>697698<p>Apply an application level setting <em>name</em> to <em>val</em>, or699get the value of <em>name</em> when <em>val</em> is not present:</p>
107 unmodified lines
modified:docs/guide.md+15 added
418 unmodified lines
419Express supports "redirect mapping", which by default provides _home_, and _back_.420The _back_ map checks the _Referrer_ and _Referer_ headers, while _home_ utilizes421the "home" setting and defaults to "/".422423### res.render(view[, options[, fn]])424425Render _view_ with the given _options_ and optional callback _fn_.426When a callback function is given a response will _not_ be made427automatically, however otherwise a response of _200_ and _text/html_ is given.428429 Most engines accept one or more of the following options,430 both [haml](http://github.com/visionmedia/haml.js) and [jade](http://github.com/visionmedia/jade) accept all:431432 - _context|scope_ Template evaluation context (_this_)433 - _locals_ Object containing local variables434 - _filename_ Filename used for the _cache_ option435 - _cache_ Cache intermediate JavaScript in memory436 - _debug_ Output debugging information437438### app.set(name[, val])439440Apply an application level setting _name_ to _val_, or441get the value of _name_ when _val_ is not present:
90 unmodified lines
modified:docs/index.html+1 added-1 removed
122 unmodified lines
123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127 padding: 1px 0;127 padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;
100 unmodified lines
modified:docs/migrate.html+1 added-1 removed
122 unmodified lines
123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127 padding: 1px 0;127 padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;
267 unmodified lines
modified:lib/express/view.js+1 added-1 removed
188 unmodified lines
189 * 190 * Most engines accept one or more of the following options,191 * both _haml_ and _jade_ accept all:192 *193 * - `context` Template evaluation context (`this`)193 * - `context|scope` Template evaluation context (`this`)194 * - `locals` Object containing local variables195 * - `filename` Filename used for the `cache` option196 * - `cache` Cache intermediate JavaScript in memory197 * - `debug` Output debugging information
98 unmodified lines