Introduce forRoot(options) pattern
henryruhs opened this issue · 0 comments
henryruhs commented
It would be nice to configure enableAbort
, enableCache
and enableObserve
defaults via forRoot()
. I have to rethink about the defaults, properly 10000ms for aborting and caching and observing.
CrudModule.forRoot(
{
abort:
{
method: 'GET',
lifetime: 2000
},
cache:
{
method: 'GET',
lifetime: 2000
},
observe:
{
method: 'GET',
lifetime: 1000
}
});
AbortModule.forRoot(
{
method: 'GET',
lifetime: 2000
}
Further reading:
https://angular.io/guide/singleton-services#the-forroot-pattern