Skip to content
Snippets Groups Projects
Commit 47e3996a authored by francois.grand's avatar francois.grand
Browse files

#79 utilisation de ServiceFactory à la place de l'injection des services

parent 03fe2769
No related branches found
No related tags found
2 merge requests!18Resolve "Gestion des libellés des résultats complémentaires",!17WIP: Resolve "Gestion des libellés des résultats complémentaires"
......@@ -25,12 +25,8 @@ export class HorizontalResultElementComponent extends ResultElementBaseComponent
this._headerKeys = h;
}
constructor(
appSetupService: ApplicationSetupService,
intlService: InternationalisationService,
private vcRef: ViewContainerRef
) {
super(appSetupService, intlService);
constructor(private vcRef: ViewContainerRef) {
super();
}
ngOnChanges() {
......
......@@ -5,6 +5,7 @@ import { ResultElement } from 'jalhyd';
import { ApplicationSetupService } from "../../services/app-setup/app-setup.service";
import { InternationalisationService } from "../../services/internationalisation/internationalisation.service";
import { OnChanges } from "@angular/core/src/metadata/lifecycle_hooks";
import { ServiceFactory } from "../../services/service-factory";
/**
* classe de base pour l'affichage d'un ResultElement
......@@ -50,10 +51,15 @@ export class ResultElementBaseComponent implements OnChanges {
*/
protected _emptyTooltip: boolean = false;
protected appSetupService: ApplicationSetupService;
protected intlService: InternationalisationService;
constructor(
protected appSetupService: ApplicationSetupService,
private intlService: InternationalisationService
) { }
) {
this.appSetupService = ServiceFactory.instance.applicationSetupService;
this.intlService = ServiceFactory.instance.internationalisationService;
}
/**
* appelé quand les @Input changent
......
......@@ -35,12 +35,8 @@ export class VerticalResultElementComponent extends ResultElementBaseComponent {
// template des tr pour les extraResult
@ViewChild("extraResultTr") trTemplate: TemplateRef<any>;
constructor(
appSetupService: ApplicationSetupService,
intlService: InternationalisationService,
private vcRef: ViewContainerRef
) {
super(appSetupService, intlService);
constructor(private vcRef: ViewContainerRef) {
super();
}
private get resultLabel() {
......
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