Router II - Did you add code to format views and upvotes?


#1

<!doctype html>
<html>
  <head>
    <link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" />
    <link href='https://fonts.googleapis.com/css?family=Roboto:400,500,300' rel='stylesheet' type='text/css'>
    <link href="css/main.css" rel="stylesheet" />

    <!-- Include the core AngularJS library -->
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>

    <!-- Include the AngularJS routing library -->
    <script src="https://code.angularjs.org/1.2.28/angular-route.min.js"></script>
  </head>
  <body ng-app="GalleryApp">

    <div class="header">
      <div ng-view></div>
      <div class="container">
        <a href="/#/">
          <img src="img/logo.svg" width="80" height="80"> &#12501; &#65387; &#12488; &#12501; &#65387; &#12488;
        </a>
      </div>
  <div class="photo">
   <div class="container">
    <img ng-src="{{ detail.url }}">
    <h2 class="photo-title"> {{ detail.title }} </h2>
    <p class="photo-author">Author: {{ detail.author }} </p>
    <p class="photo-views">Views: {{ detail.view | number }} </p>
    <p class="photo-upvotes"> {{ detail.upvotes | number }} </p>
    <p class="photo-pubdate"> {{ detail.pubdate | date }} </p>
  </div>
</div>

      
    </div>



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

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

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

  </body>
</html>

Please, what is the problem?


#2

The above code should be in its own template page, views/photo.html. In the previous lesson we added the line,

<div ng-view></div>

and we added a route to the photo template page. Go back to the beginning and review the instructions and your code..


#3

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