2017-04-18 19:12:29 +03:00
|
|
|
import { Component } from '@angular/core';
|
|
|
|
|
|
2017-04-21 17:23:44 +03:00
|
|
|
import { NgaSidebarService, NgaMenuService } from '@nga/theme';
|
2017-04-18 19:12:29 +03:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'base-header',
|
|
|
|
|
styleUrls: ['./base-header.component.scss'],
|
|
|
|
|
template: `
|
|
|
|
|
<div class="left">
|
|
|
|
|
<i class="control-icon ion ion-navicon" (click)="toggleSidebar()"></i>
|
2017-04-21 17:23:44 +03:00
|
|
|
<span class="logo" (click)="goToHome()">NgX <span>Admin</span></span>
|
2017-04-18 19:12:29 +03:00
|
|
|
</div>
|
|
|
|
|
<div class="right">
|
|
|
|
|
<search-input></search-input>
|
|
|
|
|
<i class="control-icon ion ion-ios-email-outline"></i>
|
|
|
|
|
<i class="control-icon ion ion-ios-bell-outline"></i>
|
|
|
|
|
<nga-user></nga-user>
|
|
|
|
|
<i class="control-icon ion ion-ios-gear-outline"></i>
|
|
|
|
|
</div>
|
2017-04-21 17:23:44 +03:00
|
|
|
`,
|
2017-04-18 19:12:29 +03:00
|
|
|
})
|
|
|
|
|
export class BaseHeaderComponent {
|
2017-04-21 17:23:44 +03:00
|
|
|
constructor(private sidebarService: NgaSidebarService,
|
|
|
|
|
private menuService: NgaMenuService) {
|
2017-04-18 19:12:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toggleSidebar() {
|
|
|
|
|
this.sidebarService.toggle(true);
|
|
|
|
|
}
|
2017-04-21 17:23:44 +03:00
|
|
|
|
|
|
|
|
goToHome() {
|
|
|
|
|
this.menuService.navigateHome();
|
|
|
|
|
}
|
2017-04-18 19:12:29 +03:00
|
|
|
}
|