NetanelBasal
8/10/2018 - 9:18 AM

akita-app.component.ts

export class AppComponent implements OnInit {
  showSidenav$: Observable<boolean>;

  constructor(
    private layoutQuery: LayoutQuery,
    private layoutService: LayoutService) {
  }

  ngOnInit() {
    this.showSidenav$ = this.layoutQuery.sideNavOpen$;
  }

  closeSidenav() {
    this.layoutService.setSideNavState(false);
  }

  openSidenav() {
    this.layoutService.setSideNavState(true);
  }
}