service in module ur
Provider for angular-scaffold
var s = scaffold("Dogs", {
paginate: { size: 1, strategy: 'infinite' }
});
angular
model
Creates a new object when the deferred promise is resolved
object | Deferred promise |
Find index
and delete it from the API, then remove it from the collection
Param | Type | Details |
---|---|---|
index | numberobject | Either the index of the item in the collection to remove, or the object itself, which will be searched for in the collection |
object | Promise |
Find index
and set it up for editing.
Updates the object when the deferred promise is resolved
Param | Type | Details |
---|---|---|
index | numberobject | Either the index of the item in the collection to edit, or the object itself, which will be searched for in the collection |
object | Deferred promise |
Get the configuration for this angular-scaffold instance
object | Configuration of this angular-scaffold instance |
Initialise this scaffold
object | Returns this object, supporting method chaining |
Returns the configuration for this angular-scaffold instance
string | The underlying model this object is configured with |
Select a page
Param | Type | Details |
---|---|---|
page | number | Page of results to show |
object | Configuration of this angular-scaffold instance |
Get the configuration for this angular-scaffold instance
Param | Type | Details |
---|---|---|
query | object | e.g. { name: 'name to search for' } |
page
(optional)
|
number | If supplied, used to determine which page of results to show |
object | Configuration of this angular-scaffold instance |
Go to the API and refresh
Param | Type | Details |
---|---|---|
options
(optional)
|
object | Query options to pass to the underlying angular-model |
object | Returns this object, supporting method chaining |
How many results in total are in the scaffold (not just the current page)
number | Total results |
User interface related convenience properties, so in your UI, you can show saving and loading states
the count of pages that the API reported to the scaffold
function in module ur
Configure a scaffold
scaffold(name[, options]);
Param | Type | Details |
---|---|---|
name | string | The name |
options
(optional)
|
object | Configuration object |
object | Created scaffold object |
var s = scaffold("Dogs", { paginate: true });