new module:loaders/base(container, ProgressBar)
Create a Loader.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
container |
dom | null | The dom container of loader. |
ProgressBar |
object | The progressbar of loader. |
- Source:
Members
data
Set data
- Source:
data
Get data
- Source:
Methods
fetch(url, requests) → {promise}
load the resource by url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | resource url. |
requests |
Map | used for cancellation. |
- Source:
Returns:
promise.
- Type
- promise
free()
free the reference.
- Source:
load(url, requests) → {promise}
load the data by url(urls)
Parameters:
Name | Type | Description |
---|---|---|
url |
string | array | resource url. |
requests |
Map | used for cancellation. |
- Source:
Returns:
promise
- Type
- promise
loadSequence(url, requests) → {promise}
default load sequence promise.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | resource url. |
requests |
Map | used for cancellation. |
- Source:
Returns:
promise.
- Type
- promise
loadSequenceGroup(url, requests) → {promise}
default load sequence group promise.
Parameters:
Name | Type | Description |
---|---|---|
url |
array | resource url. |
requests |
Map | used for cancellation. |
- Source:
Returns:
promise.
- Type
- promise
parse(response) → {promise}
parse the data loaded
SHOULD BE implementd by detail loader.
Parameters:
Name | Type | Description |
---|---|---|
response |
object | loaded data. |
- Source:
Returns:
promise.
- Type
- promise