Import "TranslateModule"
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
import { TranslateModule, TranslateService } from "@ngx-translate/core";
|
||||
import { Observable, forkJoin } from "rxjs";
|
||||
|
||||
import { AircraftService } from "../../services/aircraft.service";
|
||||
@@ -10,27 +10,31 @@ import { JumpTypeService } from "../../services/jump-type.service";
|
||||
import { ServiceComm } from "../../services/service-comm.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-default",
|
||||
templateUrl: "./default.component.html",
|
||||
styleUrls: ["./default.component.css"],
|
||||
standalone: false
|
||||
selector: "app-default",
|
||||
templateUrl: "./default.component.html",
|
||||
styleUrls: ["./default.component.css"],
|
||||
imports: [TranslateModule],
|
||||
})
|
||||
export class DefaultComponent implements OnInit {
|
||||
constructor(private serviceComm: ServiceComm,
|
||||
private translateService: TranslateService,
|
||||
private authenticationService: AuthenticationService,
|
||||
private serviceApiAircraft : AircraftService,
|
||||
private serviceApiJumpType : JumpTypeService,
|
||||
private serviceApiDropzone : DropzoneService,
|
||||
private serviceApiGear : GearService) {}
|
||||
constructor(
|
||||
private serviceComm: ServiceComm,
|
||||
private translateService: TranslateService,
|
||||
private authenticationService: AuthenticationService,
|
||||
private serviceApiAircraft: AircraftService,
|
||||
private serviceApiJumpType: JumpTypeService,
|
||||
private serviceApiDropzone: DropzoneService,
|
||||
private serviceApiGear: GearService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.authenticationService.alwaysLogin();
|
||||
|
||||
this.putToCacheRefDatas().subscribe(() => { console.log("Push to cache the referentiel datas"); });
|
||||
this.putToCacheRefDatas().subscribe(() => {
|
||||
console.log("Push to cache the referentiel datas");
|
||||
});
|
||||
this.updateTitle();
|
||||
this.serviceComm.forceTranslateTitle.subscribe((data)=> {
|
||||
if (data === true){
|
||||
this.serviceComm.forceTranslateTitle.subscribe((data) => {
|
||||
if (data === true) {
|
||||
this.updateTitle();
|
||||
}
|
||||
});
|
||||
@@ -46,8 +50,8 @@ export class DefaultComponent implements OnInit {
|
||||
}
|
||||
|
||||
private updateTitle() {
|
||||
this.translateService.get("Default_Title").subscribe(
|
||||
data => { this.serviceComm.updatedComponentTitle(data); }
|
||||
);
|
||||
this.translateService.get("Default_Title").subscribe((data) => {
|
||||
this.serviceComm.updatedComponentTitle(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user