mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
(Navigation) Fix: Navigation items cannot be updated on the fly
This commit is contained in:
parent
9bc4f49ab2
commit
137b728f95
|
@ -42,10 +42,10 @@
|
|||
|
||||
<ng-template #itemContent>
|
||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||
{{(item.badge.translate | translate) || item.badge.title}}
|
||||
{{item.badge.title}}
|
||||
</span>
|
||||
<mat-icon class="collapsable-arrow">keyboard_arrow_right</mat-icon>
|
||||
</ng-template>
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
|
||||
<ng-template #itemContent>
|
||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||
{{(item.badge.translate | translate) || item.badge.title}}
|
||||
{{item.badge.title}}
|
||||
</span>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
|
||||
<ng-template #itemContent>
|
||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||
{{(item.badge.translate | translate) || item.badge.title}}
|
||||
{{item.badge.title}}
|
||||
</span>
|
||||
<mat-icon class="collapsable-arrow">keyboard_arrow_right</mat-icon>
|
||||
</ng-template>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<ng-container *ngIf="!item.hidden">
|
||||
|
||||
<div class="group-title" [ngClass]="item.classes">
|
||||
<span class="hint-text" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
|
||||
<span class="hint-text" [translate]="item.translate">{{item.title}}</span>
|
||||
</div>
|
||||
|
||||
<div class="group-items">
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
|
||||
<ng-template #itemContent>
|
||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
|
||||
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||
{{(item.badge.translate | translate) || item.badge.title}}
|
||||
{{item.badge.title}}
|
||||
</span>
|
||||
</ng-template>
|
||||
|
||||
|
|
|
@ -86,17 +86,17 @@ export class AppComponent implements OnInit, OnDestroy
|
|||
* This is related to ngxTranslate module and below there is a temporary fix while we
|
||||
* are moving the multi language implementation over to the Angular's core language
|
||||
* service.
|
||||
**/
|
||||
*/
|
||||
|
||||
// Set the default language to 'en' and then back to 'tr'.
|
||||
// '.use' cannot be used here as ngxTranslate won't switch to a language that's already
|
||||
// been selected and there is no way to force it, so we overcome the issue by switching
|
||||
// the default language back and forth.
|
||||
/**
|
||||
setTimeout(() => {
|
||||
this._translateService.setDefaultLang('en');
|
||||
this._translateService.setDefaultLang('tr');
|
||||
});
|
||||
* setTimeout(() => {
|
||||
* this._translateService.setDefaultLang('en');
|
||||
* this._translateService.setDefaultLang('tr');
|
||||
* });
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -68,7 +68,7 @@ export class DocsComponentsNavigationComponent
|
|||
};
|
||||
|
||||
this._fuseNavigationService.updateNavigationItem('calendar', {
|
||||
type: 'collapsable',
|
||||
type : 'collapsable',
|
||||
children: [
|
||||
newNavItem
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user