-
Notifications
You must be signed in to change notification settings - Fork 1
DatastoreConfig
Mihael Safaric edited this page Jul 15, 2019
·
7 revisions
A decorator used for configuring a datastore service. It takes one argument, DatastoreOptions
-
network
:NetworkConfig
- see NetworkConfig
- global network configuration
- default values here
-
halDocumentClass
- sets a class on a datastore level which will be used instead of default
HalDocument
class (if not provided on a model level)
- sets a class on a datastore level which will be used instead of default
-
paginationClass
- if provided, an instance of that class will be created while creating
HalDocument
instance
- if provided, an instance of that class will be created while creating
-
cacheStrategy
:CacheStrategy
- defines which caching stragery should be used
- possible values
- optional, default: CacheStrategy.NONE
- for more information see Caching Strategies
import { HttpClient } from '@angular/common/http';
import { DatastoreService, DatastoreConfig } from 'ngx-hal';
@DatastoreConfig({
network: {
baseUrl: 'mydomain.com'
}
})
export class HalDatastoreService extends DatastoreService {
constructor(public httpClient: HttpClient) {
super(httpClient);
}
}