Methods for Backbone models and collections which fetch themselves upon instantiation
- Source:
Members
-
<inner> autoload :boolean
-
Determines if the model should fetch when instantiated
Type:
- boolean
- Source:
Methods
-
<inner> initialize(attributes, options)
-
backbone
Parameters:
Name Type Description attributesObject initial model attributes
optionsAutoloadOptions - Source:
-
<inner> onLoad(callback, ctx)
-
Register a callback to be called when there is data available. If the model has loaded, the callback
will be called immediately. Otherwise the callback will be called when the model has finished loading.Parameters:
Name Type Description callbackThe callback to be called
ctxThe context for callback
- Source:
-
<abstract, inner> url()
-
the url that data should be fetched from
- Source:
Type Definitions
-
AutoloadOptions
-
Type:
- Object
- Source:
Properties:
Name Type Description autoloadboolean If the model should autoload
loadedboolean If the model has already loaded