loadingMixin

loadingMixin

Source:
Author:
  • kent.willis@vecna.com
See:

Loading logic.

Methods

(static) constructor(args)

Source:

Adds the loading mixin

Parameters:
Name Type Description
args Object

the arguments to the base constructor method

(static) fetch(options) → {Promise}

Source:

Wraps the base fetch in a wrapper that manages loaded states

Parameters:
Name Type Description
options Object

the object to hold the options needed by the base fetch method

Returns:

The loadWrapper promise

Type
Promise

(static) getLoadedOncePromise() → {Promise}

Source:
Returns:

a promise that will resolve when the model/collection has loaded for the first time

Type
Promise

(static) hasLoadedOnce() → {boolean}

Source:
Returns:

true if this model/collection has ever loaded from a fetch call

Type
boolean

(static) isLoading() → {boolean}

Source:
Returns:

true if this model/collection is currently loading new values from the server

Type
boolean