mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-09-22 05:50:48 +02:00

With this change all components, which used data services before, now use abstract classes of service interfaces, mock services extend interface services, CoreModule contains code to inject a needed implementation of some service.
12 lines
309 B
TypeScript
12 lines
309 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { of as observableOf, Observable } from 'rxjs';
|
|
import { SolarData } from '../data/solar';
|
|
|
|
@Injectable()
|
|
export class SolarService extends SolarData {
|
|
private value = 42;
|
|
|
|
getSolarData(): Observable<number> {
|
|
return observableOf(this.value);
|
|
}
|
|
}
|