Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide documentation how to configure DefaultDataService #195

Merged
merged 1 commit into from
Oct 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/entity-dataservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ by setting this flag to `true`, which is the default for the `DefaultDataService

When running a demo app locally, the server may respond more quickly than it will in production. You can simulate real-world by setting the `getDelay` and `saveDelay` properties.

#### How to provide a custom configuration
First, create config object and specify the custom configuration:
```
const defaultDataServiceConfig: DefaultDataServiceConfig = {
root: 'api'
}
```
Provide it in the NgModule:

```
@NgModule({
providers: [{ provide: DefaultDataServiceConfig, useValue: defaultDataServiceConfig }]
})
```

## Custom _EntityDataService_

While the _ngrx-data_ library provides a configuration object to modify certain aspects of the _DefaultDataService_,
Expand Down