The Augmented.js Next - Presentation Dom Module.
npm install presentation-modelsAugmented.js Presentation Models & Collections Module
- Model
- Parameters
- crossOrigin
- Properties
- \_uri
- Properties
- sync
- Parameters
- fetch
- Parameters
- save
- Parameters
- update
- Parameters
- destroy
- Parameters
- Collection
- Parameters
- \_uri
- Properties
- sync
- Parameters
- fetch
- Parameters
- save
- Parameters
- update
- Parameters
- destroy
- Parameters
- LocalStorageCollection
- Parameters
- key
- Properties
- persist
- Properties
- namespace
- Properties
- initialize
- Parameters
- init
- Parameters
- fetch
- Parameters
- save
- Parameters
- update
- Parameters
- destroy
- Parameters
- sync
- Parameters
- PaginatedCollection
- Parameters
- setPageSize
- Parameters
- setPageSize
- Parameters
- setPageSize
- Parameters
- setCurrentPage
- Parameters
- fetch
- Parameters
- nextPage
- previousPage
- goToPage
- Parameters
- firstPage
- lastPage
- refresh
- PaginationFactory
- PAGINATION_API_TYPE
- Properties
- getPaginatedCollection
- Parameters
Extends AbstractModel
Model
Supports:
- attributes
- options (optional, default {})
- args ...any
Cross Origin property
#### Properties
- crossOrigin boolean Cross Origin property
#### Properties
- uri string The uri for the datasource (if applicable)
sync - Sync model data to bound REST call
#### Parameters
- method (optional, default "READ")
- model
- options (optional, default {})
Fetch the model
#### Parameters
- options object Any options to pass
Save the model
#### Parameters
- options object Any options to pass
Update the model
#### Parameters
- options object Any options to pass
Destroy the model
#### Parameters
- options object Any options to pass
Extends AbstractCollection
Collection Class
- models
- options (optional, default {})
#### Properties
- uri string The uri for the datasource (if applicable)
Sync collection data to bound REST call
#### Parameters
- method string The method to Unsuccessfull
- model Model The model to Sync
- options object The options to pass (optional, default {})
Returns function Returns a request function
Fetch the collection
#### Parameters
- options object Any options to pass
Save the collection
#### Parameters
- options object Any options to pass
Update the collection
#### Parameters
- options object Any options to pass
Destroy the collection
#### Parameters
- options object Any options to pass
Extends AbstractCollection
A local storage-based Collection
- models
- options (optional, default {})
Base key name for the collection (simular to url for rest-based)
#### Properties
- key string The key
is Persistant or not
#### Properties
- persist boolean Persistant property
The namespace
#### Properties
- namespace boolean
Initialize the model with needed wireing
#### Parameters
- options object Any options to pass
Custom init method for the model (called at inititlize)
#### Parameters
- options object Any options to pass
Fetch the collection
#### Parameters
- options object Any options to pass
Save the collection
#### Parameters
- options object Any options to pass
Update the collection
#### Parameters
- options object Any options to pass
Destroy the collection
#### Parameters
- options object Any options to pass
Sync method for Collection
#### Parameters
- method (optional, default "READ")
- model
- options (optional, default {})
Extends Collection
Paginated Collection Class - A Collection that handles pagination from client or server-side
- models
- options (optional, default {})
Current page for the collection
#### Parameters
- size
Total pages for the collection
#### Parameters
- size
Sets the number of items in a page
#### Parameters
- size number Number of items in each page
Sets the current page
#### Parameters
- page number Current page in collection
Collection.fetch - rewritten fetch method from Backbone.Collection.fetch
#### Parameters
- options
Moves to the next page
Moves to the previous page
Goes to page
#### Parameters
- page number Page to go to
Moves to the first page
Moves to the last page
Refreshes the collection
Pagination factory for returning pagination collections of an API type
Types of pagination API
- GITHUB Symbol GitHub API
- SOLR Symbol SOLR API
- DATABASE Symbol Database-like API
Get a pagination collection of type
- apiType Pagination.PAGINATION_API_TYPE The API type to return an instance of
- data object Collection models
- options object Collection options