import { HttpClient } from '@angular/common/http' ; import { ConfigService } from '@ngx-config/core' ; import { Observable } from 'rxjs' ; export class MockService { constructor ( private readonly config , private readonly http , private readonly settingsKey ) { } fetch$ ( ) { const backend = this . config . getSettings ( this . settingsKey ) ; return this . http . get < number > ( backend . endpoint ) ; } }