Trying to print data from an API call to one of my views:
{{forecast.list.rain['3h']}}
Making the API call successfully and the data logs in the console.
var urlForecast = "http://api.openweathermap.org/data/2.5/forecast?id=" +
$routeParams.cityId +
"&appid=d436c04d23a5a44329eb8255190a84be&callback=JSON_CALLBACK";
var forecastCall = urlForecast;
var promise2 = $http.jsonp(forecastCall);
promise2.success(function(forecast) {
$scope.forecast = forecast;
console.log($scope.forecast);
});
Not printing anything, cant see whats wrong.
$scope.forecastin question.$scope.forecastobject