mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
Adding Collection#fetch with add: true
This commit is contained in:
13
index.html
13
index.html
@@ -1251,12 +1251,19 @@ Accounts.url = '/accounts';
|
||||
Accounts.fetch();
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If you'd like to add the incoming models to the current collection, instead
|
||||
of replacing the collection's contents, pass <tt>{add: true}</tt> as an
|
||||
option to <b>fetch</b>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Note that <b>fetch</b> should not be used to populate collections on
|
||||
page load — all models needed at load time should already be
|
||||
bootstrapped in to place. <b>fetch</b> is intended for lazily-loading models
|
||||
for interfaces that are not needed immediately: for example, documents
|
||||
with collections of notes that may be toggled open and closed.
|
||||
<a href="#FAQ-bootstrap">bootstrapped</a> in to place. <b>fetch</b> is
|
||||
intended for lazily-loading models for interfaces that are not needed
|
||||
immediately: for example, documents with collections of notes that may be
|
||||
toggled open and closed.
|
||||
</p>
|
||||
|
||||
<p id="Collection-refresh">
|
||||
|
||||
Reference in New Issue
Block a user