<html>
<head>
<script type="text/javascript" src="resources/js/angular.js"></script>
<script type="text/javascript" src="resources/js/app.js"></script>
</head>
<body ng-app>
<div ng-controller="DatumCtrl">
<p>{{datum}}</p>
</div>
</body>
</html>
app.js:
var DatumCtrl = function($scope) {
$scope.datum = new Date();
};
With this I get an error:
"Error: [ng:areq] Argument 'DatumCtrl' is not a function, got undefined.
I have copied tis code from an introductory articel on AngularJS and have no prior experience with AngularJS.