Adding a controller for bringing in the weather


#1

I want to implement the weather from another country in to my home page, I am unsure where/or how add a controller to pull in the weather. Could somebody please give any advice. thank you


#2

Hi

I am a bit puzzled here. Do you want it on your homepage of your website? Then you are in the wrong forum, I’d say.

And from which service do you want to pull the data?

I’d say, give us some sample code and work you have done so far, to help the community guess with less effort.

Regards

Tom


#3

Hi Tom,

I want to pull the data in from openweathermap.org.

I want to be on my home page of my ionic app if that is any help?

The question is regarding adding a controller for incoming data.

Thanks


#4

Hi Tom,

No it is for a specific page in my app and the data is coming in JSON format.


#5

Hi

you need to do http.get in the ts file for the template.

http.get(‘http://openweathermap.org/current’)

etc…

See Ionic openweathermap api call and study the tutorials recommended.

Regards

Tom


#6

Thats great, thanks for the information Tom.

Best Regards,

Louis.