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

Removed unused code

parent c2770dc3
No related branches found
No related tags found
1 merge request!96WIP: Resolve "Simplifier les composants de résultats"
......@@ -8,7 +8,6 @@ import { CdkDragDrop, moveItemInArray } from "@angular/cdk/drag-drop";
import { Observer, jalhydDateRev, jalhydVersion, CalculatorType, Session } from "jalhyd";
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";
......@@ -43,8 +42,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 {
......@@ -81,7 +79,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,
......@@ -279,12 +276,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);
}
......@@ -411,17 +406,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