Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { DevToolsExtension, NgRedux } from '@angular-redux/store';
import { Actions, JsonFormsState, UISchemaTester } from '@jsonforms/core';
import { LocaleValidationModule, TranslationModule } from 'angular-l10n';
import { AppComponent } from './app.component';
import { JsonFormsAngularMaterialModule } from '../../src/module';
import { initialState, rootReducer } from './store';
import { ReduxComponent } from './redux.component';
import logger from 'redux-logger';
@NgModule({
declarations: [AppComponent, ReduxComponent],
imports: [
BrowserModule,
JsonFormsAngularMaterialModule,
TranslationModule.forRoot({}),
LocaleValidationModule.forRoot()
],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule {
constructor(ngRedux: NgRedux, devTools: DevToolsExtension) {
let enhancers: any[] = [];
// ... add whatever other enhancers you want.
// You probably only want to expose this tool in devMode.
if (isDevMode() && devTools.isEnabled()) {
enhancers = [...enhancers, devTools.enhancer()];
}
ngRedux.configureStore(rootReducer, initialState, [logger], enhancers);
// ListWithDetail components
ListWithDetailControl,
MasterPage,
DetailPage,
// other
LabelRenderer
],
imports: [
IonicModule,
IonicSelectableModule,
JsonFormsModule,
LocalizationModule,
LocaleValidationModule.forRoot(),
TranslationModule.forRoot(emptyL10NConfig)
],
exports: [
IonicModule,
IonicSelectableModule,
JsonFormsModule,
LocalizationModule,
LocaleValidationModule,
TranslationModule
],
entryComponents: [
// controls
BooleanCheckboxControlRenderer,
BooleanToggleControlRenderer,
StringControlRenderer,
MultilineControlRenderer,
NumberControlRenderer,
missingValue: 'No key'
}
};
export function loadConfig(oidcConfigService: OidcConfigService) {
console.log('APP_INITIALIZER STARTING');
return () => oidcConfigService.load(`${window.location.origin}/api/ClientAppSettings`);
}
@NgModule({
imports: [
BrowserModule,
FormsModule,
routing,
HttpClientModule,
TranslationModule.forRoot(l10nConfig),
DataEventRecordsModule,
AuthModule.forRoot(),
],
declarations: [
AppComponent,
ForbiddenComponent,
HomeComponent,
UnauthorizedComponent,
SecureFilesComponent
],
providers: [
OidcConfigService,
OidcSecurityService,
{
provide: APP_INITIALIZER,
useFactory: loadConfig,
missingValue: 'No key'
}
};
export function loadConfig(oidcConfigService: OidcConfigService) {
console.log('APP_INITIALIZER STARTING');
return () => oidcConfigService.load(`${window.location.origin}/api/ClientAppSettings`);
}
@NgModule({
imports: [
BrowserModule,
FormsModule,
routing,
HttpClientModule,
TranslationModule.forRoot(l10nConfig),
DataEventRecordsModule,
AuthModule.forRoot(),
],
declarations: [
AppComponent,
ForbiddenComponent,
HomeComponent,
UnauthorizedComponent,
SecureFilesComponent
],
providers: [
OidcConfigService,
OidcSecurityService,
{
provide: APP_INITIALIZER,
useFactory: loadConfig,
ServerTagFilterComponent,
ServersDetailComponent,
DirectConnectComponent,
PlayerAvatarComponent,
ColorizePipe,
EscapePipe
],
imports: [
BrowserModule.withServerTransition({ appId: 'cfx-ui' }),
FormsModule,
HttpModule,
AppRoutingModule,
VirtualScrollerModule,
MomentModule,
HttpClientModule,
TranslationModule.forRoot(l10nConfig),
Angulartics2Module.forRoot(),
LinkyModule,
MetaModule.forRoot({
provide: MetaLoader,
useFactory: (metaFactory)
}),
],
providers: [
ServersService,
ServerTagsService,
TweetService,
{
provide: GameService,
useClass: ((environment.production && !environment.web) || environment.game)
? CfxGameService
: DummyGameService
UserLocationComponent,
UserSecurityComponent,
QuestComponent,
ModalDialogQuestFeedbackComponent,
BlockContactUsComponent,
UserSkillsComponent,
WelcomeComponent,
FhqJuryAdComponent
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserModule,
NgbModule,
HttpClientModule,
TranslationModule.forRoot(l10nConfig),
AppRoutingModule,
OverlayModule,
FormsModule,
AceModule,
LMarkdownEditorModule,
ReactiveFormsModule,
BrowserAnimationsModule,
ToastrModule.forRoot(),
NgxMdModule.forRoot(),
SimplemdeModule.forRoot()
],
providers: [
{
provide: APP_BASE_HREF,
useValue: '/'
}, {
translation: {
providers: [
{ type: ProviderType.Static, prefix: './i18n/locale-' }
],
caching: true,
missingValue: 'No key'
}
};
@NgModule({
imports: [
BrowserModule,
FormsModule,
routing,
HttpClientModule,
TranslationModule.forRoot(l10nConfig),
DataEventRecordsModule,
AuthModule.forRoot(),
],
declarations: [
AppComponent,
ForbiddenComponent,
HomeComponent,
UnauthorizedComponent
],
providers: [
OidcConfigService,
{
provide: APP_INITIALIZER,
useFactory: configureAuth,