You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
5.6 KiB
138 lines
5.6 KiB
import { CommonModule } from '@angular/common'; |
|
import { HttpClient, HttpClientModule } from '@angular/common/http'; |
|
import { NgModule } from '@angular/core'; |
|
import { FormsModule } from '@angular/forms'; |
|
import { BrowserModule, Title } from '@angular/platform-browser'; |
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
|
import { |
|
MissingTranslationHandler, |
|
MissingTranslationHandlerParams, |
|
TranslateLoader, |
|
TranslateModule, |
|
TranslateService, |
|
} from '@ngx-translate/core'; |
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader'; |
|
import { ClipboardModule } from 'ngx-clipboard'; |
|
import { MarkdownModule } from 'ngx-markdown'; |
|
import { NgxWebstorageModule } from 'ngx-webstorage'; |
|
import { ConfirmationService, MessageModule, MessageService } from 'primeng'; |
|
import { ConfirmDialogModule } from 'primeng/confirmdialog'; |
|
import { DialogModule } from 'primeng/dialog'; |
|
import { ToastModule } from 'primeng/toast'; |
|
|
|
import { environment } from '../environments/environment'; |
|
import { AppRoutingModule } from './app-routing.module'; |
|
import { AppComponent } from './app.component'; |
|
import { CoreModule } from './core/core.module'; |
|
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'; |
|
import { BaseComponent } from './pages/example/base-page/base.component'; |
|
import { KindComponent } from './pages/example/kind/kind.component'; |
|
import { PicturesComponent } from './pages/example/pictures/pictures.component'; |
|
import { HomeComponent } from './pages/home/home.component'; |
|
import { PasswordComponent } from './pages/password/password.component'; |
|
import { PollDisplayComponent } from './pages/poll/poll-display/poll-display.component'; |
|
import { PollGraphicComponent } from './pages/poll/poll-graphic/poll-graphic.component'; |
|
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'; |
|
import { SharedModule } from './shared/shared.module'; |
|
import { CopyTextComponent } from './ui/copy-text/copy-text.component'; |
|
import { DebuggerComponent } from './ui/debugger/debugger.component'; |
|
import { ResettableInputDirective } from './ui/directives/resettable-input.directive'; |
|
import { ErasableInputComponent } from './ui/erasable-input/erasable-input.component'; |
|
import { NavigationComponent } from './ui/navigation/navigation.component'; |
|
import { TwoLinksComponent } from './ui/navigation/two-links/two-links.component'; |
|
import { LanguageSelectorComponent } from './ui/selectors/language-selector/language-selector.component'; |
|
import { ThemeSelectorComponent } from './ui/selectors/theme-selector/theme-selector.component'; |
|
|
|
export class MyMissingTranslationHandler implements MissingTranslationHandler { |
|
public handle(params: MissingTranslationHandlerParams): string { |
|
return `MISSING TRANSLATION FOR [${params.key}]`; |
|
} |
|
} |
|
|
|
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader { |
|
return new TranslateHttpLoader(http); |
|
} |
|
|
|
@NgModule({ |
|
declarations: [ |
|
AdminComponent, |
|
AnswersComponent, |
|
AppComponent, |
|
BaseComponent, |
|
ChoicesListComponent, |
|
CommentsListComponent, |
|
CopyTextComponent, |
|
CreateOrRetrieveComponent, |
|
DatesComponent, |
|
DebuggerComponent, |
|
EndConfirmationComponent, |
|
ErasableInputComponent, |
|
HomeComponent, |
|
KindComponent, |
|
NavigationComponent, |
|
PasswordComponent, |
|
PicturesComponent, |
|
PollDisplayComponent, |
|
PollGraphicComponent, |
|
ResettableInputDirective, |
|
ResumeComponent, |
|
ThemeSelectorComponent, |
|
TwoLinksComponent, |
|
VisibilityComponent, |
|
VotingChoiceComponent, |
|
VotingGraphComponent, |
|
VotingComponent, |
|
VotingCommentComponent, |
|
VotingSummaryComponent, |
|
VotingNavigationComponent, |
|
LanguageSelectorComponent, |
|
], |
|
imports: [ |
|
AppRoutingModule, |
|
BrowserAnimationsModule, |
|
BrowserModule, |
|
ClipboardModule, |
|
CommonModule, |
|
ConfirmDialogModule, |
|
CoreModule, |
|
DateValueAccessorModule, |
|
DialogModule, |
|
FormsModule, |
|
HttpClientModule, |
|
MarkdownModule.forRoot(), |
|
MessageModule, |
|
NgxWebstorageModule.forRoot({ prefix: environment.localStorage.key }), |
|
SharedModule, |
|
ToastModule, |
|
TranslateModule.forRoot({ |
|
loader: { |
|
provide: TranslateLoader, |
|
useFactory: HttpLoaderFactory, |
|
deps: [HttpClient], |
|
}, |
|
missingTranslationHandler: { |
|
provide: MissingTranslationHandler, |
|
useClass: MyMissingTranslationHandler, |
|
}, |
|
useDefaultLang: false, |
|
}), |
|
], |
|
providers: [ConfigService, ConfirmationService, MessageService, Title, TranslateService], |
|
bootstrap: [AppComponent], |
|
}) |
|
export class AppModule {}
|
|
|