Newer
Older
/*
* Copyright (C) 2021 Associated Universities, Inc. Washington DC, USA.
*
* This file is part of NRAO Workspaces.
*
* Workspaces is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Workspaces is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
*/

Andrew Kapuscinski
committed
import {BrowserModule, Title} from "@angular/platform-browser";

Janet Goldstein
committed
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {ReactiveFormsModule} from "@angular/forms";
import {APP_INITIALIZER, NgModule} from "@angular/core";

Janet Goldstein
committed
import {HttpClientModule} from "@angular/common/http";

Janet Goldstein
committed
import {AppComponent} from "./app.component";
import {NgbModule} from "@ng-bootstrap/ng-bootstrap";
import {WebAnalyticsService} from "./web-analytics/web-analytics.service";

Janet Goldstein
committed
import {HeaderComponent} from "./header/header.component";
import {FooterComponent} from "./footer/footer.component";

Janet Goldstein
committed
import {AppRoutingModule} from "./app-routing.module";
import {SplashComponent} from "./splash/splash.component";
import {SharedModule} from "./shared/shared.module";
import {AlertComponent} from "./shared/alert/alert.component";
import {TestDataService} from "./shared/test-data.service";
export function initializeApp(testDataService: TestDataService) {
return (): Promise<any> => { return testDataService.Init(); }
}
declarations: [AppComponent, HeaderComponent, FooterComponent, SplashComponent, AlertComponent],
entryComponents: [],
imports: [
BrowserModule,
BrowserAnimationsModule,
ReactiveFormsModule,
NgbModule,
AppRoutingModule,
HttpClientModule,

Andrew Kapuscinski
committed
providers: [WebAnalyticsService, {provide: APP_INITIALIZER, useFactory: initializeApp, deps: [TestDataService], multi: true}, Title],