set locale page

master
Boris Voropaev 2023-11-14 15:18:24 +03:00
parent 5517a1632f
commit 0cd3730a78
4 changed files with 11 additions and 3 deletions

View File

@ -15,4 +15,5 @@
</div>
</div> -->
<!-- <pages-tree [parent]="mainPage" *ngIf="mainPage"></pages-tree> -->
<button (click)="addLocale()">локаль</button>
<pages-tree></pages-tree>

View File

@ -26,4 +26,8 @@ export class AdministrateSitePagesComponent {
});
}
addLocale(){
this.formsService.createModel('page', null, null);
}
}

View File

@ -9,7 +9,7 @@
<div class="locales" style="position: relative;">
<div class="locales-btn" (click)="ddMenu=!ddMenu">
{{rootPage.name}}
{{rootPage?.name}}
<drop-down [target]="langMenu" ico="arrow_drop_down_24" [visible]="ddMenu"></drop-down>
</div>

View File

@ -16,7 +16,11 @@ export class HeaderComponent {
public locales = <any>[];
constructor(private router: Router, public authenticationService: AuthenticationService, public pagesService: PagesService) {
constructor(
private router: Router,
public authenticationService: AuthenticationService,
public pagesService: PagesService
) {
}
get rootPage() {
@ -26,7 +30,6 @@ export class HeaderComponent {
ngOnInit() {
this.pagesService.root().subscribe(res => {
this.locales = res.data;
console.log(this.locales)
});
}