Service II error when display datetime

I tried to solve this task :

2.Visit http://localhost:8000 to view the AngularJS app. 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 added the code to print the date but it return an error. Screenshot for my code and the error is below

EDIT : this is my code

<!doctype html>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="" rel="stylesheet" />
    <link href="css/main.css" rel="stylesheet" />

    <!-- Include the AngularJS library -->
    <script src="//"></script>
  <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">
              <div class="day row">
                <!-- datetime -->
                <div class="weekday col-xs-4">
                 {{ day.datetime | date }}

                <!-- icon -->
                <div class="weather col-xs-3">

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

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


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


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

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

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

    <!-- Directives -->



app.factory('forecast', ['$http', function($http){
  return $http.get('')
  .success(function(data) {
    return data;
  .error(function(err) {
    return err;


app.controller('MainController', ['$scope', 'forecast', function($scope, forecast) {
  forecast.success(function(data) {
    scope.fiveDay = data;

var app = angular.module('ForecastApp', []);

The session may have timed out, requiring a page refresh. Your code looks okay, what we can see of it.

While it’s difficult to read the next couple of instructions, go ahead and complete them and run each time so your code is saved. It might iron the wrinkles out.

We’ll assume for now that the service and controller are free of problems.

yeah I already tried to refresh page. I wrote that code yesterday, and i try to run that code again today, but it’s still doesn’t work.
Can my browser affect the result? I’m using Firefox

It’s worth a try to switch to Chrome. Copy the URL and jump right into the same page. If that doesn’t work then more looking…

it’s doesn’t work in Chrome also

Did you complete all the steps? What is displaying in the localhost browser?

I cannot get into the course right now because of overcrowding. If this is indeed a module issue, then there are going to be a lot of topics like this. We have to rule out your code. Please post everything you have right now. Controllers, Services, Views. Post raw code, not photos. Thanks.

I’m having the same issue. I’ve tried using {{ day.datetime | date : 'EEEE' }} and {{ day.datetime | date : 'EEE' }} to display the weekday yet I am getting the same error.

1 Like

Yes, I completed all the steps, until i’m stuck in this error. The localhost browser doesn’t display any error, just a background image and a title, based on template that given by this course

I edited the question and added html and js code that I use.

There have been some reported issues in some of the courseware today. I suspect it is a problem with the server, making for a long day for the folks at CC. You may need to pause for a day or two and try some of the original track courses for review or practice.

Yes, I think so.
And after almost a week and it hasn’t fixed yet.

I have the same problem, any solution?

To be honest, it gave me errors until I typed in everything correctly. Also noticed that this error popped up when all my code was correct, except for the location at which I included the services script. I moved the location to the bottom, where it’s supposed to be, and it worked right away. So maybe it thinks you have some code out of place? If not, try using some paragraph tags?

Can you show your code?

Done, I’ve reset the code and do it again. I think my mistake was I delete “” in the code with an error mark. This time I didn’t remove it and works.

1 Like