Day view don't display data


#1

Hello&Welcome
I have problem with displaying data.
Routing is working, but on screen i get {{ day.date | date }}. It's looking like datas are not loaded.
Please, let me know what i doing wrong :smile:

day.html

<h2 class="date">{{ day.date | date }}</h2>
<div class="event" ng-repeat="event in day.events">
  <a href="#/{{$index}}">
    <h3 class="name">{{event.name}}  </h3>
    <p><span class="from"> {{event.from | date}} </span> - <span class="to"> {{event.to | date}} </span></p>
  </a>
</div>

events.js

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

DayController.js

app.controller('DayController', ['$scope','events', function($scope, events) {
	events.success(function(data){
  	$scope.day = data;
  });
}]);

Thanks in advance.


#2

What does your view (index.html) look like?


#3
<div class="header">
  <div class="container">
    <img src= "img/logo.svg" width="51" height="54">
  </div>
</div>

<div class="main">
  <div class="container">
 	 <div ng-view></div>
    

  </div>
</div>

#4

Well you got your things mixed around at the end of the factory/service ]}); should be }]);


#5

Yeah, this is it. Thanks a lot!