mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +01:00
feat: demo version additions
This commit is contained in:
parent
0eec54695f
commit
eee950248e
322 changed files with 23456 additions and 188 deletions
52
docs/app/@theme/components/header/header.component.ts
Normal file
52
docs/app/@theme/components/header/header.component.ts
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Akveo. All Rights Reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*/
|
||||
|
||||
import { OnInit, Component, HostBinding, Input, OnDestroy } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { NbSidebarService } from '@nebular/theme';
|
||||
|
||||
import { NgxVersionService } from '../../services/version.service';
|
||||
import { HeaderMenuService } from '../../../@core/data/service/header-menu.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-landing-header',
|
||||
styleUrls: ['./header.component.scss'],
|
||||
templateUrl: './header.component.html',
|
||||
})
|
||||
export class NgxLandingHeaderComponent implements OnInit, OnDestroy {
|
||||
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
@HostBinding('class.docs-page') @Input() isDocs = false;
|
||||
|
||||
@Input() sidebarTag: string = '';
|
||||
|
||||
currentVersion: string;
|
||||
headerMenu = [];
|
||||
|
||||
constructor(private sidebarService: NbSidebarService,
|
||||
private versionService: NgxVersionService,
|
||||
private headerMenuService: HeaderMenuService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.currentVersion = this.versionService.getNgxVersion();
|
||||
|
||||
this.headerMenuService.getHeaderMenu()
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe((headerMenu) => this.headerMenu = headerMenu);
|
||||
}
|
||||
|
||||
toggleSidebar() {
|
||||
this.sidebarService.toggle(false, this.sidebarTag);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.destroy$.next();
|
||||
this.destroy$.complete();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue