v1.0.9
You can (optionally) declare Collection Service configuration details in your module or component providers:
providers: [
{
provide: 'COLLECTION_SERVICE_OPTIONS',
useValue: {
allowFetchedDuplicates: environment.production,
}
},
]
Token COLLECTION_SERVICE_OPTIONS
is just a string to don't break lazy-loading (if you are using it).
Options structure:
interface CollectionServiceOptions {
comparatorFields?: string[];
throwOnDuplicates?: string;
allowFetchedDuplicates?: boolean; // if not set: true
}