import {Component, OnInit} from '@angular/core';
import {NavigationStatusService} from "app/services";
@Component({
selector: 'app-navigation-toggler',
templateUrl: './navigation-toggler.component.html',
styleUrls: ['./navigation-toggler.component.scss']
})
export class NavigationTogglerComponent implements OnInit {
navigationOpen: boolean;
constructor(private navigationStatusService: NavigationStatusService) {
}
ngOnInit() {
this.navigationStatusService.navigationOpen.subscribe(
navigationOpen => this.navigationOpen = navigationOpen
);
}
toggleNavigation() {
this.navigationStatusService.changeNavigationSatus(!this.navigationOpen);
}
}