I am facing an issue with my small weather app. While everything works fine in the browser, I am encountering errors from the TS compiler stating that the properties name
, main
, and wind
do not exist on type Weather[]
. However, it appears that I have already added these properties in the Weather[]
class...
export class AppComponent implements OnInit {
// rest of the code remains the same
export class Weather {
// rest of the code remains the same
}
//Get Weather
//it worked when I changed here Weather[] to Weather !!!
getWeather(city:string):Observable<Weather> {
// rest of the code remains the same
}