src/app/layout/sidebar/sidebar.component.ts
Navigation component
selector | app-sidebar |
templateUrl | ./sidebar.component.html |
Properties |
Methods |
constructor(authService: AuthService)
|
||||||||
Contructor
Parameters :
|
ngDoCheck |
ngDoCheck()
|
Do check
Returns :
void
|
securityInfo |
securityInfo:
|
Type : SecurityInfo
|
Security Info |
import { Component, DoCheck } from '@angular/core';
import { SecurityInfo } from '../../shared/model/about/security-info.model';
import { AuthService } from '../../auth/auth.service';
/**
* Navigation component
*
* @author Gunnar Hillert
* @author Damien Vitrac
*/
@Component({
selector: 'app-sidebar',
templateUrl: './sidebar.component.html',
})
export class SidebarComponent implements DoCheck {
/**
* Security Info
*/
securityInfo: SecurityInfo;
/**
* Contructor
* @param {AuthService} authService
*/
constructor(private authService: AuthService) {
this.securityInfo = authService.securityInfo;
}
/**
* Do check
*/
ngDoCheck() {
this.securityInfo = this.authService.securityInfo;
}
}
<div id="sidebar">
<div class="sidebar-header">
<a routerLink="/" class="logo-link">
<span class="icon">
<app-logo></app-logo>
</span>
<span class="sidebar-title">Data Flow</span>
</a>
</div>
<app-navigation></app-navigation>
</div>