I am writing a client side clock that ticks in Angular.js. However, nothing is showing up. For conventions, I wanted the clock to be a service injected into the controller.
html:
<small>Current time is: {{ clientClock.now() | date: 'mediumTime' }} </small>
service:
angular.module('monitorApp')
.factory('clockTicker', function($interval) {
$interval(function(){ }, 1000);
return {
clientClock: function() { return Date; }
}
});
controller:
$scope.clientClock = clockTicker.clientClock;