-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathweather-content.component.ts
More file actions
27 lines (25 loc) · 874 Bytes
/
Copy pathweather-content.component.ts
File metadata and controls
27 lines (25 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Component, input } from '@angular/core';
import { WeatherData } from '../types/weather.types';
import { CurrentWeatherComponent } from './current-weather.component';
import { ForecastComponent } from './forecast.component';
@Component({
selector: 'app-weather-content',
imports: [CurrentWeatherComponent, ForecastComponent],
template: `
<div
class="weather-content"
data-testid="weather-content"
[hidden]="!isVisible()"
>
@let currentWeatherData = weatherData();
<div class="weather-layout">
<app-current-weather [weatherData]="currentWeatherData"></app-current-weather>
<app-forecast [weatherData]="currentWeatherData"></app-forecast>
</div>
</div>
`
})
export class WeatherContentComponent {
readonly isVisible = input(false);
readonly weatherData = input<WeatherData | null>(null);
}