File

src/app/apm/layout/layout.component.ts

Implements

OnInit OnDestroy

Metadata

selector apm-layout
styleUrls ./layout.component.scss
templateUrl ./layout.component.html

Index

Properties
Methods

Constructor

constructor(navigationService: NavigationService)
Parameters :
Name Type Optional
navigationService NavigationService No

Methods

ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void

Properties

customizerSidenavAlign
Type : string
Default value : 'end'
navigationModel
Type : any[]
navigationModelChangeSubscription
Type : Subscription
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

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""