Routing III


#1

So I used the code below in the photo.html and instead of displaying values the view window displays the text used for code. The exercise accepted the code, but something is obviously wrong..
<div class="photo">
<div class="container">
<img ng-src="{{ detail.url }}">
<h2 class="photo-title">{{ photo.title }} </h2>
<p class="photo-author"> {{ photo.author }}</p>
<p class="photo-views">{{ photo.views | number }} </p>
<p class="photo-upvotes">{{ photo.upvotes number }} </p>
<p class="photo-pubdate"> {{ photo.pubdate | date }}</p>
</div>
</div>


#2

Hello @krizevec,

have you defined the scope for the AngularJS app, and you should probably replace photo.blah with photos.blah.
Try out my suggestions and see if they work.

Regards,
Barry Allen


#3

{{ photos.upvotes number }}

I had as

{{ photos.upvotes | number }}

If that also makes any difference.


#4

In Photocontroller we had this line of code:

$scope.detail = data[$routeParams.id];

So that detail variable contains data of each photo object.
You must declaire {{detail.title}} instead of {{photo.title}}
The rest must also be done in the same way.