At this point we may want to consider breaking our code up into modules. E.g., let's make server its own module:

  angular.module('ngcourse.server', [])
    .constant('API_BASE_URL', '')
    .service('serverService', ServerService);

We can then make it a dependency in our ngcourse module (in app.ts):

  angular.module('ngcourse', [

Note that an Angular "app" is basically just an Angular module.

Each module can define .config() and .run() sections. You will rarely see .config() except when setting up routes. (We'll discuss it in that context.) Your .run() is essentially you modules's equivalent of the "main" block.

  angular.module('ngcourse', [

  .run($log => $'All ready!'));

Keep in mind, though, that Angular's modules are somewhat of a fiction.