refactor(@core): refactor data services for better integration (#1997)

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.
This commit is contained in:
Valentin Kononov 2019-01-18 16:25:35 +03:00 committed by Dmitry Nehaychik
parent f17aa32c6d
commit cac36f0717
67 changed files with 389 additions and 201 deletions

View file

@ -1,7 +1,7 @@
import {Component, OnDestroy} from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import { takeWhile } from 'rxjs/operators' ;
import { SolarService } from '../../@core/data/solar.service';
import { SolarData } from '../../@core/data/solar';
interface CardSettings {
title: string;
@ -77,7 +77,7 @@ export class DashboardComponent implements OnDestroy {
};
constructor(private themeService: NbThemeService,
private solarService: SolarService) {
private solarService: SolarData) {
this.themeService.getJsTheme()
.pipe(takeWhile(() => this.alive))
.subscribe(theme => {