Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
documentation: typo fix for view-lookup
Diff stats
1 file+3 added−3 removed
other:+3 added−3 removed
Provenance
Commit
6b2ec50
Tree
ebfd36b
Author
TJ Holowaychuk <tj@vision-media.ca>
Committer
TJ Holowaychuk <tj@vision-media.ca>
Parent 1
cdaa2e7
Parent 2
7b813b9
1 file changed+3 added−3 removed
modified:docs/migrate.md+3 added-3 removed
121 unmodified lines
Expand all
122
123
124
125
126
126
127
128
129
130
25 unmodified lines
156
157
158
159
160
160
161
162
163
164
8 unmodified lines
173
174
175
176
177
177
121 unmodified lines
Expand all
res.partial('comment', comment);
### partial() locals
Both _res.partial()_ and the _partial()_ functions accept an single object consisting of both the options and the locals. Previously with Express 1.x you may pass _user_ to a partial, along with _date_ like so:
Both _res.partial()_ and the _partial()_ functions accept a single object consisting of both the options and the locals. Previously with Express 1.x you may pass _user_ to a partial, along with _date_ like so:
partial('user', { object: user, locals: { date: new Date }})
or perhaps if you preferred not to use the inferred name _user_ you may used a local for this as well:
25 unmodified lines
fn(locals);
### View Partial Lookup
Previously partials were loaded relative to the now removed _view partials_ directory setting, or by default _views/partials_, now they are relative to the view calling them, read more on [view lookup](guide.html#View-Lookup).
Previously partials were loaded relative to the now removed _view partials_ directory setting, or by default _views/partials_, now they are relative to the view calling them, read more on [view lookup](guide.html#view-lookup).
### Mime Types
Express and Connect now utilize the _mime_ module in npm, so to add more use:
8 unmodified lines
Previously when using options the `root` option would be used for this: