UNPKG

tfabrica

Version:

library for TFabrica - TechSol

28 lines (23 loc) 745 B
import { Component, ViewChild } from '@angular/core'; import { TfabricaSharedService } from './tfabrica.shared.service'; import { Subscription } from 'rxjs/Subscription'; @Component({ selector: 't-main', template: require('./tfabrica.main.component.html') }) export class TfabricaMainComponent { @ViewChild('tleftmenu') tleftmenu; subscription: Subscription; constructor( private tfabricaSharedService: TfabricaSharedService ) { this.subscription = tfabricaSharedService.mainLeftSidenavToggled$.subscribe( toogle => { this.toggleSidenavMenu(); } ) } toggleSidenavMenu() { this.tleftmenu.toggle(); } }