Services II Instructions


"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.


I have the same problem....


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.


Does this help you:

<!-- Include the AngularJS library -->
<script src="//"></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 class="weather col-md-3">
              <img ng-src="{{ day.icon }}">
            <div class="weather col-md-1">
            <div class="high col-md-2">
              <p>{{ day.high }}&deg;</p>
            <div class="low col-md-2">
              <p>{{ day.low }}&deg;</p>

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

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

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

<!-- Directives -->