apps/live-weather/src/app/shared/smart-place-card/smart-place-card.component.ts
selector | weather-base-smart-place-card |
styleUrls | ./smart-place-card.component.scss |
templateUrl | ./smart-place-card.component.html |
Properties |
|
Methods |
|
Inputs |
Outputs |
constructor(openWeatherService: OpenWeatherService, router: Router)
|
||||||||||||
Creates instance of
Parameters :
|
airQuality | |
Default value : false
|
|
place | |
Type : IPlace
|
|
placeImage | |
Default value : false
|
|
addPlaceToFavorites | |
Type : EventEmitter<IPlace>
|
|
Public getWeatherReport | ||||||||
getWeatherReport(place: IPlace)
|
||||||||
Gets weather condition for the requested location
Parameters :
Returns :
Observable<IOpenWeatherReport>
weather condition details observer |
Public goToPlaceDetails | ||||||||
goToPlaceDetails(place: IPlace)
|
||||||||
Navigate to details page of place requested
Parameters :
Returns :
void
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
Public toggleFavorite |
toggleFavorite()
|
Toggles favorite state of a place
Returns :
void
|
Public currentTime |
Default value : new Date().toISOString()
|
Represents current time in ISO format |
Public loadingWeather |
Default value : false
|
Flag to check loading status of weather |
weather |
Type : IOpenWeatherReport | null
|
Default value : null
|
./smart-place-card.component.scss