import { HttpClient } from '@angular/common/http' ; import { Injectable , Optional } from '@angular/core' ; import { Hero , ToastService } from '../core' ; import { CqrsDataService , DataServiceConfig , HttpUrlGenerator } from '../data-services' ; @ Injectable ( ) export class OldHeroService extends CqrsDataService < Hero > { constructor ( http , httpUrlGenerator , @ Optional ( ) toastService , @ Optional ( ) config ) { super ( 'Hero' , http , httpUrlGenerator , toastService , config ) ; } protected filterProjector ( filterValue , entities ) { const regEx = filterValue ? new RegExp ( filterValue , 'i' ) : undefined ; return regEx ? entities . filter ( ( e ) => e . name && e . name . match ( regEx ) ) : entities ; } }