So I am following a very basic AngularJS tutorial, found here
I have gotten to about step 10 but nothing is being displayed in my view. What gives?
Here is the contents of index.html:
<html>
<head>
<title>My Angular App!</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-app="flapperNews" ng-controller="MainCtrl">
<div ng-repeat="post in posts">
{{post.title}} - upvotes: {{post.upvotes}}
</div>
</body>
</html>
Here is the comments of app.js:
angular.module('flapperNews', [])
.controller('MainCtrl', [
'$scope',
function($scope){
$scope.test = 'Hello world!';
}]);
$scope.posts = [
{title: 'post 1', upvotes: 5},
{title: 'post 2', upvotes: 2},
{title: 'post 3', upvotes: 15},
{title: 'post 4', upvotes: 9},
{title: 'post 5', upvotes: 4}
];