title: "Invalid provider for the NgModule" when using AoT
body: <p>Without AoT everything works fine. But after switching loaders, I am getting this error and have no clue how to fix it, or what exactly is wrong.</p>
  
  <blockquote>
    <p>Invalid provider for the NgModule 'AppModule in
    /xxx/src/app/app.module.ts' - only instances of Provider and Type are
    allowed, got: [LoggerService in
    /xxx/src/app/services/logger-service.service.ts, LocalStorageService
    in
    /xxx/node_modules/angular-2-local-storage/dist/local-storage.service.d.ts,
    WindowService in /xxx/src/app/services/window.service.ts, ?null?, ...]</p>
  </blockquote>
  
  <p>Related code from <code>AppModule</code>:</p>
  
  <pre><code>import CustomHttp from './services/custom-http.service';
  
  ...
  
  @NgModule({
  
  ...
  
    providers: [
      LocalStorageService,
      WindowService,
      AuthService,
      LoggerService,
      CustomHttp,
      AuthTokenStore,
      AuthService,
      SchemaValidator,
      AuthInterceptor,
      DataService,
      ErrorHelper,
      FileUpload,
      {provide: ErrorHandler, useClass: LoggingErrorHandler},
      NonAngularDialogsHelper,
      ConfirmationService,
      SearchHelper,
      FormHelper,
      DebugHelper,
      PuxApplication,
      StoreUtils,
      TranslationHelper,
      MessagesService,
      CustomValidatorsService,
      GeolocationService,
      SavedSearchesService,
      LoggedInfoService,
      BeTranslate,
      CountryHelper,
      SuggestionGenerators,
      PrimeNgHelper,
      UrlHelper,
      DocumentClickService,
      NavigationHelper,
      BeErrorsInterceptor,
      DocumentService,
      ScrollHelper,
      LinkDialogHelper,
      HtmlUtilsService,
      RouterHelperService,
      StripeService,
      VatExamplesService,
      ContactInfoHelper,
      WizardHelper,
      PasswordChangingPagesHelper,
      LandingPageHelper,
      TrackingEventsHelper,
      RfoHelper,
      ReactiveFormsHelper,
      LiveChatService,
  
      CounterActions
    ]
  
  ...
  </code></pre>
  
  <p>Snippets from <code>CustomHttp</code>:</p>
  
  <pre><code>...
  
  @Injectable()
  export default class CustomHttp {
  
  ...
  
    constructor(private http: Http,
                loggerService: LoggerService) {
      this.logger = loggerService.createLogger('CustomHttp');
    }
  
  ...
  </code></pre>
  
  <p>Edit 1: Added whole providers array as requested.</p>