(function() {
  'use strict';

  angular.module('app.feature.dateTime').controller('DateTimeController', [
    '$scope', '$interval',
    function($scope, $interval) {
      $interval(function() {
        $scope.dateTime = Date.now();
      }, 1000);
    }
  ]);
})();

(function() {
  'use strict';

  angular.module('app.feature.dateTime').controller('DateTimeController', [
    '$scope', '$interval',
    function($scope, $interval) {
      // Set the current date and time on startup
      $scope.dateTime = Date.now();
      // And afterwards every second in an endless loop
      $interval(function() {
        $scope.dateTime = Date.now();
      }, 1000);
    }
  ]);
})();

Set current date and time before starting the interval service
Set current date and time before starting the interval service

- The interval service does not start immediately, instead it waits the
  configured amount of time before it runs the code that is declared inside
  the callback function.
