Module: js-whatever/js/autoload-methods

js-whatever/js/autoload-methods

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
attributes Object

initial model attributes

options AutoloadOptions
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
callback

The callback to be called

ctx

The context for callback

Source:

<abstract, inner> url()

the url that data should be fetched from

Source:

Type Definitions

AutoloadOptions

Type:
  • Object
Properties:
Name Type Description
autoload boolean

If the model should autoload

loaded boolean

If the model has already loaded

Source:
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.