0
0
llucycodes42
The ModelService class is simply extending the EntityCollectionServiceBase class. This class provides a generic interface for all our models, and it is up to the user to provide their own implementations of the get() method. We also inject the service ElementsFactory into the constructor so that we can get hold of the underlying collection of models.
Library: angular
Shortcut: a_ngrx_data_entity_collection_data_service
import { Injectable } from '@angular/core';
import {
EntityCollectionServiceBase,
EntityCollectionServiceElementsFactory
} from '@ngrx/data';
import { Model } from '../core';
@Injectable({ providedIn: 'root' })
export class ModelService extends EntityCollectionServiceBase<Model> {
constructor(serviceElementsFactory: EntityCollectionServiceElementsFactory) {
super('Model', serviceElementsFactory);
}
}