diff --git a/index.html b/index.html
index 73297fe..fbd7dfa 100644
--- a/index.html
+++ b/index.html
@@ -16,7 +16,7 @@
{{weather.current.temp}}°C
- {{weather.current.weather[0].main}}
+ {{weather.current.weather[0].main}}{{loading}}
@@ -38,10 +38,10 @@
- - +1h{{weather.hourly[0].temp}}°C
- - +2h{{weather.hourly[1].temp}}°C
- - +4h{{weather.hourly[3].temp}}°C
- - +8h{{weather.hourly[7].temp}}°C
+ - +1h{{weather.hourly[0].temp}}°C
{{weather.hourly[0].weather[0].main}}
+ - +2h{{weather.hourly[1].temp}}°C
{{weather.hourly[1].weather[0].main}}
+ - +4h{{weather.hourly[3].temp}}°C
{{weather.hourly[3].weather[0].main}}
+ - +8h{{weather.hourly[7].temp}}°C
{{weather.hourly[7].weather[0].main}}
@@ -53,6 +53,7 @@
app.controller('body', function($scope, $http) {
//Some sort of async function so location is got before the script called
$scope.weather = 0
+ $scope.loading = 'Loading...'
// $scope.weather.current.temp = 1;
navigator.geolocation.getCurrentPosition((position) => {
$scope.loaddata(position.coords.latitude, position.coords.longitude)
@@ -64,6 +65,7 @@
$scope.loaddata = function(lat, lon) {
$http.get("https://api.openweathermap.org/data/2.5/onecall?lat=" + lat + "&lon=" + lon + "&units=metric&appid=5292f0a17ecbe4b523fe0609ed2c556f").then(function (response) {
$scope.weather = response.data;
+ $scope.loading = ''
$scope.lat = lat;
$scope.lon = lon;
})