display normal & featured menu on connect front-end based on show/hide boolean value
This commit is contained in:
parent
2c289af1e6
commit
a79e9f6cc9
|
@ -180,7 +180,7 @@
|
|||
</ng-container>
|
||||
<!-- Custom menu items -->
|
||||
<!-- TODO: Add to mobile menu as well! -->
|
||||
<ng-container *ngIf="additionalMenuItems?.length > 0 && properties.environment == 'development'">
|
||||
<ng-container *ngIf="isMenuEnabled && additionalMenuItems?.length > 0">
|
||||
<ng-container *ngFor="let menu of additionalMenuItems">
|
||||
<li class="uk-parent" [class.uk-active]="isTheActiveMenu(menu)">
|
||||
<!-- INTERNAL ROOT-->
|
||||
|
@ -235,8 +235,8 @@
|
|||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<!-- New navbar for featured menu items - test only -->
|
||||
<ng-container *ngIf="featuredMenuItems?.length > 0 && properties.environment == 'development'">
|
||||
<!-- New navbar for featured menu items only -->
|
||||
<ng-container *ngIf="isFeaturedMenuEnabled && featuredMenuItems?.length > 0">
|
||||
<div class="uk-background-primary uk-light">
|
||||
<div class="uk-container uk-container-expand">
|
||||
<div class="uk-navbar" uk-navbar>
|
||||
|
|
|
@ -56,6 +56,8 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
|
|||
|
||||
public additionalMenuItems: MenuItem[] = [];
|
||||
public featuredMenuItems: MenuItem[] = [];
|
||||
public isMenuEnabled: boolean = false;
|
||||
public isFeaturedMenuEnabled: boolean = false;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -119,6 +121,8 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
|
|||
this.subs.push(
|
||||
this._helpContentService.getMenuItems(this.portal).subscribe(
|
||||
data => {
|
||||
this.isMenuEnabled = data.isMenuEnabled;
|
||||
this.isFeaturedMenuEnabled = data.isFeaturedMenuEnabled;
|
||||
this.featuredMenuItems = data.featuredMenuItems;
|
||||
this.additionalMenuItems = data.menuItems;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue