Here are my files: timeline.html:
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>
</head>
<body ng-app="timelineApp">
<div ng-controller="MainController">
<p>{{ title }}</p>
</div>
<!-- Modules -->
<script src="js/app.js"></script>
<!-- Controllers -->
<script src="js/controllers/MainController.js"></script>
</body>
</html>
app.js:
var timelineApp = angular.module("timelineApp", []);
MainController.js:
timelineApp.controller('MainController', ['$scope', function($scope) {
$scope.title = 'this is a test';
}]);
What am I missing? I thought I did everything right but for some reason it won't even display the title. Thank you so much!
Aucun commentaire:
Enregistrer un commentaire