[Library | angular-14]: navigationBar.component: Added field "public featuredAlignment: string = MenuAlignment.CENTER.valueOf();" and align custom menu according to this, dynamically.
This commit is contained in:
parent
acdba43c8b
commit
53a39d0a34
|
@ -289,7 +289,7 @@
|
|||
<div class="uk-background-primary uk-light">
|
||||
<div class="uk-container uk-container-expand">
|
||||
<div class="uk-navbar" uk-navbar="delay-hide: 400">
|
||||
<div class="uk-navbar-right">
|
||||
<div [ngClass]="'uk-navbar-'+featuredAlignment.toLowerCase()">
|
||||
<ul class="uk-navbar-nav">
|
||||
<ng-container *ngFor="let item of featuredMenuItems">
|
||||
<li [class.uk-active]="isTheActiveMenu(item)" [ngClass]="item.customClass">
|
||||
|
|
|
@ -2,7 +2,7 @@ import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
|||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Session, User} from '../login/utils/helper.class';
|
||||
import {ConfigurationService} from '../utils/configuration/configuration.service';
|
||||
import {MenuItem} from './menu';
|
||||
import {MenuAlignment, MenuItem} from './menu';
|
||||
import {EnvProperties} from '../utils/properties/env-properties';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {HelpContentService} from '../services/help-content.service';
|
||||
|
@ -60,6 +60,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
|
|||
public featuredMenuItems: MenuItem[] = [];
|
||||
public isMenuEnabled: boolean = false;
|
||||
public isFeaturedMenuEnabled: boolean = false;
|
||||
public featuredAlignment: string = MenuAlignment.CENTER.valueOf();
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -125,6 +126,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
|
|||
data => {
|
||||
this.isMenuEnabled = data.isMenuEnabled;
|
||||
this.isFeaturedMenuEnabled = data.isFeaturedMenuEnabled;
|
||||
this.featuredAlignment = data.featuredAlignment;
|
||||
this.featuredMenuItems = data.featuredMenuItems;
|
||||
this.additionalMenuItems = data.menuItems;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue