Services II error HELP!


#1

I'm not sure what the error means, on step 2 it says something, but when I do it, it says it's wrong and that I should do the step 3, though when I do it, it shows the error below.

This is the link to the exercise:
https://www.codecademy.com/courses/learn-angularjs/lessons/services/exercises/services-ii

This is my HTML code that shows the error:

<!doctype html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" />
    <link href="css/main.css" rel="stylesheet" />

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

    <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" ng-src="image in fiveDays.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">


                </div>


                <!-- low -->
                <div class="low col-xs-2">

                </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 -->


  </body>
</html>


Here is the error:

expected .high text to match /\d/


#2

This

You're missing the closing tag.

<img ng-src="{{ day.icon }}">

Let me know if that resolves. :slight_smile:


#3

It didn't, even in my script I had the closing tag there, but it was at another line because of the monitor I'm using. :sob:


#4

Ooops...You also yet to complete the high and low data for a day. You do that for each in class high and low in col-xs-2. See high instance below.

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

#5

Oh well, it did work. It can be confusing, they should've said that on the Instruction.

But thank you very much!


#6

It's in the instructions.

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.

You're welcome.

Have fun coding! :slight_smile:


#7

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