You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
670 B
TypeScript
24 lines
670 B
TypeScript
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Output} from "@angular/core";
|
|
|
|
@Component({
|
|
selector: "app-drawer-page",
|
|
templateUrl: "./drawer-page.component.html",
|
|
styleUrls: ["./drawer-page.component.scss"],
|
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
})
|
|
export class DrawerPageComponent {
|
|
|
|
public drawerOpened = true;
|
|
|
|
@Output() appSizeChange = new EventEmitter<void>();
|
|
|
|
constructor(private changeDetecter: ChangeDetectorRef) {
|
|
}
|
|
|
|
public toggleDrawer(): void {
|
|
this.drawerOpened = !this.drawerOpened;
|
|
this.appSizeChange.emit();
|
|
this.changeDetecter.markForCheck();
|
|
}
|
|
}
|