Skip to content

Commit

Permalink
feat(docs): improves mixin related docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iobaixas committed Sep 24, 2014
1 parent 62f1dcb commit e28368e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
16 changes: 8 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ For a quick usage reference checkout the [README](https://github.com/platanus/an

## Main Components

### The **$restmod** service
### The **restmod** service

The main entry point for the library is the [$restmod service]($restmod.html). This service provides the `model` factory method that allow creation of new models via the builder DSL.
The main entry point for the library is the [restmod service](restmod.html). This service provides the `model` factory method that allow creation of new models via the builder DSL.

There is also a [restmod provider]($restmodProvider.html) that allows some global configuration of models.
There is also a [restmod provider](restmodProvider.html) that allows some global configuration of models.

### The Model Builder API

Expand All @@ -21,7 +21,7 @@ An extensive description of the builder usage and options can be found in the [B

### The Model Type

Every call to `$restmod.model` generates a new model type.
Every call to `restmod.model` generates a new model type.

Every instance of the model is called a record, every record has its own set of instance methods, check the [RecordApi](RecordApi.html) section for reference.

Expand All @@ -42,8 +42,8 @@ The restmod lib includes a couple of mixins that can be included in the project
* [PagedModel](PagedModel.html): basic paging support, included in **plugins/paged.js**. (very basic)
* [DirtyModel](DirtyModel.html): change tracking for record properties, included in **plugins/dirty.js**.
* [DebouncedModel](DebouncedModel.html): provides a debounced/throttled implementation of $save, included in **plugins/debounced.js**. (DEPRECATED: To be moved to a separate library!)
* [DebouncedModel](DebouncedModel.html): provides a debounced/throttled implementation of $save, included in **plugins/debounced.js**. (DEPRECATED: To be moved to a separate library!)
* [DebouncedModel](DebouncedModel.html): provides a debounced/throttled implementation of $save, included in **plugins/debounced.js**. (DEPRECATED: To be moved to a separate library!)

* [Shared](SharedModel.html): shared record instances, included in **plugins/shared.js**.
* [FindMany](FindMany.html): batch find by id using the `$populate` method, included in **plugins/find-many.js**.
* [Preload](Preload.html): reference relation eager loading via the `$preload` method, included in **plugins/preload.js**.

Check the [$restmod service]($restmod.html) docs for more information about mixin creation.
Check the [restmod service](restmod.html) docs for more information about mixin creation.
8 changes: 4 additions & 4 deletions src/plugins/find-many.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @mixin Populate
* @mixin FindMany
*
* @description
*
Expand All @@ -15,8 +15,8 @@ angular.module('restmod').factory('restmod.FindMany', ['restmod', 'RMPackerCache
return restmod.mixin(function() {

/**
* @method $populate
* @memberOf Populate
* @method $findManyUrl
* @memberOf FindMany
*
* @description Provides the url for a findMany/populate operation.
*/
Expand All @@ -25,7 +25,7 @@ angular.module('restmod').factory('restmod.FindMany', ['restmod', 'RMPackerCache
})
/**
* @method $populate
* @memberOf Populate
* @memberOf FindMany
*
* @description Resolves a series of records using a single api call.
*
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ angular.module('restmod').factory('restmod.Preload', ['restmod', '$q', function(
* handles nested relation names. If a nested relation is added to be resolved
* then the parent relation is also resolved.
*
* **IMPORTANT**: Only `belongsTo` and `belongsToMany` relations can be preloaded.
*
* Usage:
*
* ```javascript
Expand Down

0 comments on commit e28368e

Please sign in to comment.