bug fix
parent
f47c522ead
commit
fc72ea8bc3
|
|
@ -1,3 +1,8 @@
|
|||
export const html = {
|
||||
project:'app-root'
|
||||
project:'app-root',
|
||||
header: null,
|
||||
leftContent: null,
|
||||
footer: null,
|
||||
rightContent: null,
|
||||
ico:null,
|
||||
}
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
<div class="item" [ngClass]="itemClass">
|
||||
<drop-down *ngIf="children?.length"
|
||||
ico="chevron_right_24" [visible]="toggle" [target]="menu" [angle]="[0,90]">
|
||||
ico="chevron_right_24" [visible]="toggle" (toggle)="toggle=$event" [target]="menu" [angle]="[0,90]">
|
||||
</drop-down>
|
||||
<a [routerLink]="item.link">
|
||||
{{item.name}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div #menu class="sub-menu" [ngClass]="menuClass">
|
||||
<pages-menu *ngIf="children?.length" [items]="children" [level]="level+1"></pages-menu>
|
||||
</div>
|
||||
<div #menu class="sub-menu" [ngClass]="itemClass">
|
||||
<pages-menu *ngIf="children?.length" [items]="children" [lavel]="lavel+1"></pages-menu>
|
||||
|
|
@ -9,7 +9,7 @@ import {Subscription} from 'rxjs';
|
|||
})
|
||||
export class PagesMenuItemComponent {
|
||||
@Input() item: any;
|
||||
@Input() level: number;
|
||||
@Input() lavel: number;
|
||||
public toggle=false;
|
||||
|
||||
currentURL:string;
|
||||
|
|
@ -45,7 +45,7 @@ export class PagesMenuItemComponent {
|
|||
let menuClass = {
|
||||
selected: this.toggle
|
||||
}
|
||||
menuClass['level-'+(this.level+1)] = true;
|
||||
menuClass['lavel-'+(this.lavel+1)] = true;
|
||||
return menuClass
|
||||
}
|
||||
|
||||
|
|
@ -55,6 +55,7 @@ export class PagesMenuItemComponent {
|
|||
parent: this.parent&&!this.current,
|
||||
current: this.current
|
||||
}
|
||||
itemClass['lavel-'+(this.lavel+1)] = true;
|
||||
return itemClass
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { html } from '@environments/htmlenv';
|
||||
|
||||
@Component({
|
||||
selector: 'ico',
|
||||
|
|
@ -27,7 +28,9 @@ export class IcoComponent {
|
|||
this.width = this.size[0]
|
||||
this.height = this.size[1]
|
||||
}
|
||||
this.url = `assets/images/icons/${this.ico}.svg#ico`
|
||||
let src = html.ico||'assets/images/icons/';
|
||||
this.url = `${src}${this.ico}.svg#ico`
|
||||
console.log(this.url)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@ export const html = {
|
|||
header: null,
|
||||
leftContent: null,
|
||||
footer: null,
|
||||
rightContent: null
|
||||
rightContent: null,
|
||||
ico:null,
|
||||
}
|
||||
|
|
@ -4,4 +4,5 @@ export const html = {
|
|||
leftContent:'../../../../../projects/vniigaz/src/assets/html/left-content.component.html',
|
||||
footer:'../../../../../projects/vniigaz/src/assets/html/footer.component.html',
|
||||
rightContent:'../../../../../projects/vniigaz/src/assets/html/right-content.component.html',
|
||||
ico:"assets/images/ico/"
|
||||
}
|
||||
Loading…
Reference in New Issue