Individual days won't display as expected (drawn to the left area)


#1

Hi, I am stuck on exercise Services II.

I managed to connect the service, and the data is pulled in the view, but the view renders weirdly.

Not sure what went wrong. I have not changed the CSS.

If I take the project offline, it seems to work (more or less, not pulling in all the icons):

This is my relevant code from index.html:







<!-- Include the AngularJS library -->
<script src="https://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>
  </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 -->


Is this a bug or have I missed something? Any hint appreciated.


#2

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