2020-04-22 12:56:18 +02:00
|
|
|
import { CommonModule } from '@angular/common';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { FormsModule } from '@angular/forms';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { BrowserModule, Title } from '@angular/platform-browser';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
2019-10-01 16:39:29 +02:00
|
|
|
import {
|
2020-04-21 10:50:26 +02:00
|
|
|
MissingTranslationHandler,
|
|
|
|
MissingTranslationHandlerParams,
|
|
|
|
TranslateLoader,
|
|
|
|
TranslateModule,
|
|
|
|
TranslateService,
|
2019-10-01 16:39:29 +02:00
|
|
|
} from '@ngx-translate/core';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
|
|
import { ClipboardModule } from 'ngx-clipboard';
|
|
|
|
import { MarkdownModule } from 'ngx-markdown';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { NgxWebstorageModule } from 'ngx-webstorage';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { ConfirmationService, MessageModule, MessageService } from 'primeng';
|
|
|
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
|
|
import { DialogModule } from 'primeng/dialog';
|
|
|
|
import { ToastModule } from 'primeng/toast';
|
2019-11-22 10:18:09 +01:00
|
|
|
|
2020-04-22 12:56:18 +02:00
|
|
|
import { environment } from '../environments/environment';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
|
|
import { AppComponent } from './app.component';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { CoreModule } from './core/core.module';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { DateValueAccessorModule } from './custom-lib/date-value-accessor';
|
|
|
|
import { AdminComponent } from './pages/admin/admin.component';
|
|
|
|
import { AnswersComponent } from './pages/answers/answers.component';
|
|
|
|
import { CreateOrRetrieveComponent } from './pages/create-or-retrieve/create-or-retrieve.component';
|
|
|
|
import { DatesComponent } from './pages/dates/dates.component';
|
|
|
|
import { EndConfirmationComponent } from './pages/end-confirmation/end-confirmation.component';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { BaseComponent } from './pages/example/base-page/base.component';
|
2020-04-20 18:11:00 +02:00
|
|
|
import { KindComponent } from './pages/example/kind/kind.component';
|
|
|
|
import { PicturesComponent } from './pages/example/pictures/pictures.component';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { HomeComponent } from './pages/home/home.component';
|
|
|
|
import { PasswordComponent } from './pages/password/password.component';
|
2020-04-20 18:11:00 +02:00
|
|
|
import { PollDisplayComponent } from './pages/poll/poll-display/poll-display.component';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { PollGraphicComponent } from './pages/poll/poll-graphic/poll-graphic.component';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { ResumeComponent } from './pages/resume/resume.component';
|
|
|
|
import { VisibilityComponent } from './pages/visibility/visibility.component';
|
|
|
|
import { ChoicesListComponent } from './pages/voting/choices-list/choices-list.component';
|
|
|
|
import { CommentsListComponent } from './pages/voting/comments-list/comments-list.component';
|
|
|
|
import { VotingChoiceComponent } from './pages/voting/voting-choice/voting-choice.component';
|
|
|
|
import { VotingCommentComponent } from './pages/voting/voting-comment/voting-comment.component';
|
|
|
|
import { VotingGraphComponent } from './pages/voting/voting-graph/voting-graph.component';
|
|
|
|
import { VotingNavigationComponent } from './pages/voting/voting-navigation/voting-navigation.component';
|
|
|
|
import { VotingSummaryComponent } from './pages/voting/voting-summary/voting-summary.component';
|
|
|
|
import { VotingComponent } from './pages/voting/voting.component';
|
|
|
|
import { ConfigService } from './services/config.service';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { SharedModule } from './shared/shared.module';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { CopyTextComponent } from './ui/copy-text/copy-text.component';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { DebuggerComponent } from './ui/debugger/debugger.component';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { ResettableInputDirective } from './ui/directives/resettable-input.directive';
|
|
|
|
import { ErasableInputComponent } from './ui/erasable-input/erasable-input.component';
|
|
|
|
import { NavigationComponent } from './ui/navigation/navigation.component';
|
2020-04-20 18:15:30 +02:00
|
|
|
import { TwoLinksComponent } from './ui/navigation/two-links/two-links.component';
|
2020-04-22 12:56:18 +02:00
|
|
|
import { LanguageSelectorComponent } from './ui/selectors/language-selector/language-selector.component';
|
|
|
|
import { ThemeSelectorComponent } from './ui/selectors/theme-selector/theme-selector.component';
|
2019-08-12 14:40:33 +02:00
|
|
|
|
2019-10-01 16:39:29 +02:00
|
|
|
export class MyMissingTranslationHandler implements MissingTranslationHandler {
|
2020-04-22 12:56:18 +02:00
|
|
|
public handle(params: MissingTranslationHandlerParams): string {
|
|
|
|
return `MISSING TRANSLATION FOR [${params.key}]`;
|
2020-04-21 10:50:26 +02:00
|
|
|
}
|
2019-10-01 16:39:29 +02:00
|
|
|
}
|
2019-08-12 14:40:33 +02:00
|
|
|
|
2020-04-14 11:28:33 +02:00
|
|
|
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
2020-04-21 10:50:26 +02:00
|
|
|
return new TranslateHttpLoader(http);
|
2019-10-01 15:43:37 +02:00
|
|
|
}
|
2019-08-09 13:38:51 +02:00
|
|
|
|
|
|
|
@NgModule({
|
2020-04-21 10:50:26 +02:00
|
|
|
declarations: [
|
2020-04-22 12:56:18 +02:00
|
|
|
AdminComponent,
|
|
|
|
AnswersComponent,
|
2020-04-21 10:50:26 +02:00
|
|
|
AppComponent,
|
|
|
|
BaseComponent,
|
2020-04-22 12:56:18 +02:00
|
|
|
ChoicesListComponent,
|
|
|
|
CommentsListComponent,
|
|
|
|
CopyTextComponent,
|
|
|
|
CreateOrRetrieveComponent,
|
2020-04-21 10:50:26 +02:00
|
|
|
DatesComponent,
|
|
|
|
DebuggerComponent,
|
|
|
|
EndConfirmationComponent,
|
2020-04-22 12:56:18 +02:00
|
|
|
ErasableInputComponent,
|
2020-04-21 10:50:26 +02:00
|
|
|
HomeComponent,
|
2020-04-22 12:56:18 +02:00
|
|
|
KindComponent,
|
|
|
|
NavigationComponent,
|
|
|
|
PasswordComponent,
|
|
|
|
PicturesComponent,
|
2020-04-21 10:50:26 +02:00
|
|
|
PollDisplayComponent,
|
2020-04-22 12:56:18 +02:00
|
|
|
PollGraphicComponent,
|
2020-04-21 10:50:26 +02:00
|
|
|
ResettableInputDirective,
|
2020-04-22 12:56:18 +02:00
|
|
|
ResumeComponent,
|
2020-04-21 10:50:26 +02:00
|
|
|
ThemeSelectorComponent,
|
2020-04-21 17:26:25 +02:00
|
|
|
TwoLinksComponent,
|
2020-04-22 12:56:18 +02:00
|
|
|
VisibilityComponent,
|
|
|
|
VotingChoiceComponent,
|
|
|
|
VotingGraphComponent,
|
|
|
|
VotingComponent,
|
|
|
|
VotingCommentComponent,
|
|
|
|
VotingSummaryComponent,
|
|
|
|
VotingNavigationComponent,
|
|
|
|
LanguageSelectorComponent,
|
2020-04-21 10:50:26 +02:00
|
|
|
],
|
|
|
|
imports: [
|
2020-04-22 12:56:18 +02:00
|
|
|
AppRoutingModule,
|
|
|
|
BrowserAnimationsModule,
|
|
|
|
BrowserModule,
|
2020-04-21 10:50:26 +02:00
|
|
|
ClipboardModule,
|
|
|
|
CommonModule,
|
2020-04-22 12:56:18 +02:00
|
|
|
ConfirmDialogModule,
|
|
|
|
CoreModule,
|
2020-04-21 10:50:26 +02:00
|
|
|
DateValueAccessorModule,
|
2020-04-22 12:56:18 +02:00
|
|
|
DialogModule,
|
|
|
|
FormsModule,
|
|
|
|
HttpClientModule,
|
2020-04-21 10:50:26 +02:00
|
|
|
MarkdownModule.forRoot(),
|
2020-04-22 12:56:18 +02:00
|
|
|
MessageModule,
|
|
|
|
NgxWebstorageModule.forRoot({ prefix: environment.localStorage.key }),
|
|
|
|
SharedModule,
|
|
|
|
ToastModule,
|
2020-04-21 10:50:26 +02:00
|
|
|
TranslateModule.forRoot({
|
|
|
|
loader: {
|
|
|
|
provide: TranslateLoader,
|
|
|
|
useFactory: HttpLoaderFactory,
|
|
|
|
deps: [HttpClient],
|
|
|
|
},
|
2020-04-22 12:56:18 +02:00
|
|
|
missingTranslationHandler: {
|
|
|
|
provide: MissingTranslationHandler,
|
|
|
|
useClass: MyMissingTranslationHandler,
|
|
|
|
},
|
|
|
|
useDefaultLang: false,
|
2020-04-21 10:50:26 +02:00
|
|
|
}),
|
|
|
|
],
|
2020-04-22 12:56:18 +02:00
|
|
|
providers: [ConfigService, ConfirmationService, MessageService, Title, TranslateService],
|
2020-04-21 10:50:26 +02:00
|
|
|
bootstrap: [AppComponent],
|
2019-08-09 13:38:51 +02:00
|
|
|
})
|
2020-04-14 11:28:33 +02:00
|
|
|
export class AppModule {}
|