What's wrong with this project - Outbox


#1

Data is not showing. Here is what I've done:

INDEX.JS

<!doctype html>
<html>
  <head>
      <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,700' rel='stylesheet' type='text/css'>
    <link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" />
    <link href="css/main.css" rel="stylesheet" />
    <script src="js/vendor/angular.min.js"></script>
  </head>
  <body ng-app="OutboxApp">
    <div class="header">
      <div class="container">
        <img src="img/logo.svg" width="140" height="150">
      </div>
    </div>

    <div class="main" ng-controller="HomeController.js">
      <div class="container">

        <div class="email" ng-repeat="email in emails">
          <span class="from"> {{email.from}}</span> 
          <span class="subject"> {{email.subject}}</span>
          <span class="date"> {{email.datetime | date}} </span>
        </div>

      </div>
    </div>

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

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

    <!-- Services -->
    <script src="js/services/emails.js"></script>
  </body>
</html>

APP.JS

var app = angular.module("OutboxApp", []);

EMAILS.JS

app.factory('emails', ['$http', function($http) { 
  return $http.get('https://s3.amazonaws.com/codecademy-content/courses/ltp4/emails-api/emails.json')
            .success(function(data) { 
              return data; 
            }) 
            .error(function(err) { 
              return err; 
            }); 
}]);

HOMECONTROLLER.JS

app.controller('HomeController', ['$scope', 'emails', function($scope, emails) {
      emails.success(function(data) {
    	 $scope.emails = data;
      });

}]);

4/7 getting only this response {{ info.home_team }}
#2

Is this the completed exercise, 8/8? Did you try refreshing the localhost browser a couple of times? Your code checks out on visual inspection.


#3

I did refresh, logged in and out and still the same - the scope does not get rendered. Did I missing any scripts?

app.js

emails.js

index.html

HomeController.js


#4

It looks like you have everything.

Have you spoken with an advisor? This is a Pro extra.


#5

Roy,

Just to be clear, I'm stuck unless I can get this resolved. Are you an employee of Codecademy or just a contributing user? If the latter, thanks for the help you've given me so far. If you're part of Codecademy, please pass this to another professional who can get a resolution. I'm a paying member.

Chris


#6

Which is out of our domain. That is why they have advisors. There is also a Report Bugs form in each lesson. You're welcome for the little I've given you so far.


#7

Good advice and thanks. I'll try to pay it forward whenever I can get this stuff down.


#8

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