Services II not working


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
Services II

<In what way does your code behave incorrectly? Include ALL error messages.>
My code for services II exercise does not show an error but it doesn’t pass. Here is the instruction:
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 think it is correct, can you help me?

<!doctype html>

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

            <!-- datetime -->
            <div class="weekday col-xs-4">
									<p>
                  	{{day.datetime | date}}
              </p>
            </div>


            <!-- icon -->
            <div class="weather col-xs-3">
									<img ng-src="{{day.icon}}">
            </div>

            <div class="col-xs-1"></div>


            <!-- high -->
            <div class="high col-xs-2">
									<p>
                  	{{day.high}}
              </p>

            </div>


            <!-- low -->
            <div class="low col-xs-2">
										<p>
                    	{{day.high}}
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>
</div>

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

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

<!-- Services -->
<!-- Directives -->

#2

Should be {{day.low}}


#3

I also notice that there are no semicolons at the end of your ‘{{ }}’

Example:

You have:

{{day.datetime | date}}

Should be:

{{day.datetime | date}};

The compiler doesn’t seem to catch this (or at least it didn’t for me) but I noticed that when I added semicolons to the end of the double curly bracers that the second objective was marked complete. This must be done for datetime, icon, high, and low.


#4

Semi-colons only follow statements, not expressions. The first example is correct.


#5

Change it. Still not working.


#6

Could it be a simple as this…?

<p>{{ day.high }}&deg;</p>

<p>{{ day.low }}&deg;</p>

#7

I passed after several tries, by re-paste the address to: “https://localhost:8000/”, instead of “https://localhost”.


#8

Sometimes we just have to refresh the localhost browser a couple of times using its refresh button.


#9

This worked for me, thanks.


#10

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.