Gameboard doesn't display anything


#1

I've checked all the other examples and I can't see anything wrong with it...

index.html

<!doctype html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Oswald' 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='GameboardApp'>
    <div class="header">
      <h1 class="logo">GameBoard</h1>
    </div>

    <div class="main" ng-controller='ScoreController'>
      <div class="container">
        
        <div class="row" >
         <game  ng-repeat="score in scores" info="score"></game>
        </div>
      
      </div>
    </div>
    
    <!-- Modules -->
    <script src="js/app.js"></script>

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

    <!-- Directives -->
    <script src='js/directives/game.js'></script>

  </body>
</html>

app.js

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

game.js

app.directive('game',function(){
  return{
    restrict: 'E',
    scope:{
      info:'='
    },
    templateURL: 'js/directives/game.html'
  };
});

game.html

<div class="col-sm-4">
  <div class="row scorecard">
    <p class="period">{{info.period}}</p>
    <div class="visitor col-xs-4">
      <h2 class="visitor-score">{{ info.visitor_score }}</h2>
      <h3>
        <span class="visitor-city">{{ info.visitor_team.city }}</span><br/>
        <span class="visitor-name">{{ info.visitor_team.name }}</span>
      </h3>
    </div>
    <div class="dash col-xs-3">
      <h2>-</h2>
    </div>
    <div class="home col-xs-4">
      <h2 class="home-score">{{ info.home_score }}</h2>
      <h3>
        <span class="home-city">{{ info.home_team.city }}</span><br/>
        <span class="home-name">{{ info.home_team.name }}</span>
      </h3>
    </div>
  </div>
</div>

#2

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