Answer the question
In order to leave comments, you need to log in
Loading data from open sources?
It is necessary to implement the loading of data on the site from third-party resources. In this case, we are talking about a weather widget, and openweathermap.org/current acts as a third-party site. How is Jason data loaded from any remote resource in Angular? For example, locally I do it like this:
$http.get('items/items.json').success(function(data, status, headers, config) {
$scope.items = data;
});
Answer the question
In order to leave comments, you need to log in
in theory, you need a cross-domain request, for example, to api.openweathermap.org/data/2.5/weather?q=London ,uk&appid=2de143494c0b295cca9337e1e96b00e0 . But, as far as I understand, this is not so easy to do.
anyway you can get information to your server via curl and then give it to your application via standard angular gets )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question