Services II Instructions


#1

"Let's finish the view so that it displays the weather for each day.

Notice in the view, we're using ng-repeat to loop through each item in the days array. Inside this loop, display a day's four pieces of data.

Remember to use ng-src to display an image."

I don't understand this.


#2

I have the same problem....


#3

Just fill up the view as it should be (the icon is an img btw)

I had another bug, i had an error message like "impossible to join server", i fixed it by adding "https://" in front of the src attibute of the script element which permits to include the angularJS library.


#4

Does this help you:






<!-- Include the AngularJS library -->
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>


<div class="main" ng-controller="MainController">
  <div class="container">
    <div class="row">
      <div class="col-sm-5 col-sm-offset-7">
        <h1>{{ fiveDay.city_name }}</h1>
        <h2>5-day forecast</h2>
        <div class="forecast" ng-repeat="day in fiveDay.days">
          <div class="day row">
            <div class="weekday col-md-4">
              <p>{{ day.datetime | date }}</p>
            </div>
            <div class="weather col-md-3">
              <img ng-src="{{ day.icon }}">
            </div>
            <div class="weather col-md-1">
            </div>
            <div class="high col-md-2">
              <p>{{ day.high }}&deg;</p>
            </div>
            <div class="low col-md-2">
              <p>{{ day.low }}&deg;</p>
            </div>
          </div>
        </div>
      </div>
    </div>
    </ul>
  </div>
</div>

<!-- Modules -->
<script src="js/app.js"></script>

<!-- Controllers -->
<script src="js/controllers/MainController.js"></script>

<!-- Services -->
<script src="js/services/forecast.js"></script>

<!-- Directives -->



#6