Skip to content
Snippets Groups Projects
Commit 2371de30 authored by mathias.chouet's avatar mathias.chouet
Browse files

Get rid of unused ErrorService

parent 3edcb02a
No related branches found
No related tags found
1 merge request!82Resolve "Ajout de la fonctionnalité "Respect des critères""
......@@ -9,7 +9,6 @@ import { Observer, jalhydDateRev, jalhydVersion, CalculatorType, Session } from
import { environment } from "../environments/environment";
import { I18nService } from "./services/internationalisation.service";
import { ErrorService } from "./services/error.service";
import { FormulaireService } from "./services/formulaire.service";
import { FormulaireDefinition } from "./formulaire/definition/form-definition";
import { ServiceFactory } from "./services/service-factory";
......@@ -46,8 +45,7 @@ declare let device: any;
@Component({
selector: "nghyd-app",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.scss"],
providers: [ErrorService]
styleUrls: ["./app.component.scss"]
})
export class AppComponent implements OnInit, OnDestroy, Observer {
......@@ -84,7 +82,6 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
constructor(
private intlService: I18nService,
private appSetupService: ApplicationSetupService,
private errorService: ErrorService,
private router: Router,
private formulaireService: FormulaireService,
private httpService: HttpService,
......@@ -277,12 +274,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
*/
ngOnInit() {
this.formulaireService.addObserver(this);
this.subscribeErrorService();
this._innerWidth = window.innerWidth;
}
ngOnDestroy() {
this.unsubscribeErrorService();
this.formulaireService.removeObserver(this);
}
......@@ -409,17 +404,6 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
return fits;
}
/**
* abonnement au service d'erreurs
*/
private subscribeErrorService() {
this.errorService.addObserver(this);
}
private unsubscribeErrorService() {
this.errorService.removeObserver(this);
}
public get enableHeaderDoc(): boolean {
return this.currentRoute === "/list" && this._calculators.length === 0;
}
......
import { Injectable } from "@angular/core";
import { Observable } from "jalhyd";
@Injectable()
export class ErrorService extends Observable {
// TODO: add explicit constructor
doAlert(m: string) {
this.notifyObservers(m);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment