import { Component } from '@angular/core' import { trigger, state, style, animate, transition } from '@angular/animations' @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], animations: [ trigger('slideInOut', [ state('close', style({ opacity: '0', height: '0px' })), state('open', style({ opacity: '1', height: '*' })), transition('close => open', animate('300ms ease-in-out')), transition('open => close', animate('300ms ease-in-out')) ]) ] }) export class AppComponent { public title: string = 'Dslak weather station' public day: string = new Date().toISOString().substring(0,10) public menuOpen: boolean = false toggleMenu(): void { this.menuOpen = !this.menuOpen } }