Idée pour avoir un BaseComponent pour gérer le titre et la gestion des icons pour les mat-icons
This commit is contained in:
@@ -10,6 +10,7 @@ import { DropzoneService } from "../../services/dropzone.service";
|
||||
import { GearService } from "../../services/gear.service";
|
||||
import { JumpTypeService } from "../../services/jump-type.service";
|
||||
import { ServiceComm } from "../../services/service-comm.service";
|
||||
import { BaseComponent } from "../app.base.component";
|
||||
|
||||
@Component({
|
||||
selector: "app-default",
|
||||
@@ -17,18 +18,21 @@ import { ServiceComm } from "../../services/service-comm.service";
|
||||
styleUrls: ["./default.component.css"],
|
||||
imports: [TranslateModule, MatIconModule, RouterLink],
|
||||
})
|
||||
export class DefaultComponent implements OnInit {
|
||||
export class DefaultComponent extends BaseComponent {
|
||||
//implements OnInit {
|
||||
constructor(
|
||||
private serviceComm: ServiceComm,
|
||||
private translateService: TranslateService,
|
||||
// private serviceComm: ServiceComm,
|
||||
// private translateService: TranslateService,
|
||||
private authenticationService: AuthenticationService,
|
||||
private serviceApiAircraft: AircraftService,
|
||||
private serviceApiJumpType: JumpTypeService,
|
||||
private serviceApiDropzone: DropzoneService,
|
||||
private serviceApiGear: GearService
|
||||
) {}
|
||||
private serviceApiGear: GearService,
|
||||
) {
|
||||
super("Default_Title");
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
override ngOnInit() {
|
||||
this.authenticationService.alwaysLogin();
|
||||
|
||||
this.putToCacheRefDatas().subscribe(() => {
|
||||
@@ -52,8 +56,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