You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
834 B
34 lines
834 B
2 years ago
|
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
|
||
|
}
|
||
|
}
|