src/app/apm/layout/layout.component.ts
| selector | apm-layout |
| styleUrls | ./layout.component.scss |
| templateUrl | ./layout.component.html |
Properties |
Methods |
constructor(navigationService: NavigationService)
|
||||||
|
Defined in src/app/apm/layout/layout.component.ts:13
|
||||||
|
Parameters :
|
| ngOnDestroy |
ngOnDestroy()
|
|
Defined in src/app/apm/layout/layout.component.ts:25
|
|
Returns :
void
|
| ngOnInit |
ngOnInit()
|
|
Defined in src/app/apm/layout/layout.component.ts:23
|
|
Returns :
void
|
| customizerSidenavAlign |
Type : string
|
Default value : 'end'
|
|
Defined in src/app/apm/layout/layout.component.ts:11
|
| navigationModel |
Type : any[]
|
|
Defined in src/app/apm/layout/layout.component.ts:12
|
| navigationModelChangeSubscription |
Type : Subscription
|
|
Defined in src/app/apm/layout/layout.component.ts:13
|
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import { NavigationService } from './navigation.service';
@Component({
selector: 'apm-layout',
templateUrl: './layout.component.html',
styleUrls: ['./layout.component.scss']
})
export class LayoutComponent implements OnInit, OnDestroy {
customizerSidenavAlign: string = 'end';
navigationModel: any[];
navigationModelChangeSubscription: Subscription;
constructor(private navigationService: NavigationService) {
this.navigationModelChangeSubscription = this.navigationService.onNavigationModelChange.subscribe(
navigation => {
this.navigationModel = navigation;
}
);
}
ngOnInit() {}
ngOnDestroy() {
this.navigationModelChangeSubscription.unsubscribe();
}
}
<mat-sidenav-container>
<mat-sidenav class="sidenav" mode="side" opened>
<stbui-brand class="stbui-background-purple" brand="Apm"></stbui-brand>
<stbui-navigation [navigationModel]="navigationModel"></stbui-navigation>
</mat-sidenav>
<mat-sidenav-content> <router-outlet></router-outlet> </mat-sidenav-content>
</mat-sidenav-container>
./layout.component.scss