This is the Angular JS function on my page:
function DateCtrl($scope) {
$scope.returndate = function () {
return Date.now();
}
}
The markup is as follows:
<html ng-app>
<body>
<div id = "date" class = "stats" ng-controller = "DateCtrl">
<span>Date:</span><div id = "noedate">{{returndate()}}</div>
</div>
</body>
</html>
You would expect the date returned in #nowdate
to change every second thanks to the data-binding, but it does not. Does anyone know what is wrong here?
I would provide a fiddle but jsfiddle does not support angular yet...